Table des matières
- Content management -- Gestion de contenu
- Datatypes -- Types de données
- The content class -- La classe de contenu
- Class attributes -- Attributs de classe
- The content object -- L'objet de contenu
- Object versioning -- Gestion des versions des objets
- Multiple languages -- Plusieurs langues
- The content node -- Le noeud de contenu
- The content node tree -- L'arbre de noeuds de contenu
- Top level nodes -- Noeuds de niveau supérieur
- Node visibility -- Visibilité des noeuds
- Object relations -- Relations entre objets
- Sections -- Les sections
- URL storage -- Stockage d'URL
- Information collection -- Collecte d'informations
Node visibility -- Visibilité des noeuds
Date de publication: le mardi 22 mars 2011 à 18h00
Dernière modification: par Pascal BOYER le vendredi 25 mars 2011 à 00h20
versions 3.9, 3.10, 4.x
Since publishing means adding an object (by the way of a node) to the content tree, un-publishing would imply the removal of the object from the tree. Once an object is published, it can not be un-published because eZ Publish does not provide such a feature. Instead, the system provides a hiding mechanism which can be used to change the visibility of nodes. The hide feature makes it possible to prevent the system from displaying the contents of published objects. This is achieved by denying access to the nodes. A single node or a subtree of nodes can be hidden either by a user or by the system. A node can have one of the following visibility statuses:
Puisque publier signifie ajouter un objet (au moyen d'un nœud) à l'arbre de contenu, "dépublier" devrait impliquer la suppression d'un objet de l'arbre. Une fois qu'un objet est publié, il ne peut plus être retiré ("déplublié") parce que eZ Publish ne propose pas une telle fonction. Par contre, le système fournit un mécanisme d'occultation pour modifier la visibilité des nœuds. La fonction d'occultation permet d'empêcher le système d'afficher les contenus des objets publiés en refusant l'accès aux nœuds. Un seul nœud ou un groupe de nœuds peuvent être occultés soit par un utilisateur, soit par le système. Un nœud peut donc avoir les statuts de visibilité suivants:
-
Visible
Visible
-
Hidden
Caché
-
Hidden by superior
Caché par supérieur
All nodes are visible by default and thus the objects they reference can be accessed. A user can hide or un-hide a node using the administration interface. Once a node is hidden, all its descendants will automatically be marked "Hidden by superior" and thus the descendants will also become hidden. A node can not become visible if its parent is hidden.
Tous les nœuds sont visibles par défaut et les objets qu'ils référencent sont donc accessibles. Un utilisateur peut cacher ou rendre visible un nœud par le biais de l'interface d'administration. Un nœud une fois caché, tous ses descendants sont automatiquement marqués "caché par supérieur" et ne sont donc pas publiés. Un nœud ne peut être visible si son parent est caché.
A hidden node will not be available unless the "ShowHiddenNodes" directive within the "[SiteAccessSettings]" block of a configuration override for "site.ini" is set to true. The most common way to use this setting is to disallow all but the administration interface to show hidden nodes.
Un nœud caché ne sera disponible que si le paramètre ShowHiddenNodes de la section [SiteAccessSettings] du fichier de surcharge de site.ini est positionnée à true. La façon la plus courante d'utiliser ce paramètre est de tout interdire mais de permettre à l'interface d'administration de montrer tout de même les nœuds cachés.
Implementation / Implémentation
Each node has two flags: "H" and "X". While "H" means "hidden", "X" means "invisible". The hidden flag reveals whether the node was been hidden by a user or not. A raised invisibility flag means that the node is invisible either because it was hidden by a user or by the system. Together, the flags represent the three visibility statuses that were described above:
Chaque nœud a deux drapeaux: H et X. Alors que H signifie hidden/caché, X signifie invisible. Le drapeau caché signifie que le nœud est caché ou non par un utilisateur. Un drapeau de non visibilité (X) «hissé» signifie que le nœud est invisible soit parce qu'il a été caché par un utilisateur soit par le système. Associés, ces deux drapeaux représentent les trois statuts de visibilité décrits ci-dessus.
| H | X | Statut |
|---|---|---|
| - | - |
The node is visible. Le nœud est visible |
| 1 | 1 |
The node is invisible. It was hidden by a user. Le nœud est invisible. Il a été caché par un utilisateur. |
| - | 1 |
The node is invisible. It was hidden by the system because its ancestor is hidden/invisible. Le nœud est invisible. Il a été caché par le système parce qu'un parent/ancêtre est caché/invisible |
If a user tries to hide an already invisible node then the node's hidden flag will be set in addition to the invisible flag. If a node is hidden and its parent becomes visible, the node will remain hidden while the descendants will remain invisible. The following illustrations show how the node hiding algorithm works.
Si un utilisateur essaye de cacher un nœud déjà caché, alors le drapeau hidden du nœud sera positionné en plus du drapeau invisible. Si un nœud est caché et que ses parents deviennent visibles alors le nœud restera caché et ses descendants resteront invisibles. Les illustrations suivantes montrent comment fonctionne l'algorithme d'occultation.
Case 1: Hiding a visible node / Cacher un nœud visible
The following illustration shows what happens when a visible node is hidden by a user. The node will be marked hidden. Underlying nodes will be marked invisible (hidden by superior). The visibility status of underlying nodes already marked hidden or invisible will not be changed.
L'illustration suivante montre ce qui arrive lorsqu'un nœud visible est caché par un utilisateur. Le nœud sera marqué caché et les nœuds sous-jacents seront alors marqués invisibles (cachés par supérieur). Le statut de visibilité des nœuds sous-jacents déjà marqués cachés ou invisibles ne sera pas changé:
Hiding a visible node
Cacher un nœud visible
Case 2: Hiding an invisible node / Cacher un nœud invisible
The following illustration shows what happens when an invisible node (hidden by superior) is explicitly hidden by a user. The node will be marked as hidden. Since the underlying nodes are already either hidden or invisible, their visibility status will not be changed.
L'illustration suivante montre ce qui arrive lorsqu'un nœud invisible (caché par supérieur) est explicitement caché par un utilisateur. Le nœud sera marqué caché. Si les nœuds sous-jacents sont déjà, soit cachés soit invisibles, leur statut de visibilité ne sera pas changé:
Hiding an invisible node
Cacher un nœud invisible
Case 3: Un-hiding a node with a visible ancestor / Ne plus cacher un nœud ayant un ancêtre visible
The following illustration shows what happens when a user un-hides a node that has a visible ancestor. Underlying invisible nodes will become visible. An underlying node that was explicitly hidden by a user will remain hidden (and its children will be remain invisible).
L'illustration suivante montre ce qui arrive lorsqu'un utilisateur rend visible un nœud ayant un ancêtre visible. Les nœuds sous-jacents invisibles deviennent visibles et un nœud sous-jacent qui était explicitement caché par un utilisateur reste caché (et ses enfants restent invisibles):
Unhiding a node with a visible ancestor
Ne plus cacher un nœud ayant des ancêtres visibles
Case 4: Un-hiding a node with an invisible ancestor / Ne plus cacher un nœud ayant un ancêtre invisible
The following illustration shows what happens when a user un-hides a node that has an invisible ancestor. Since the target node is un-hided in a subtree that is currently invisible (because a node further up in the hierarchy has been explicitly hidden), the node will not become visible. Instead, it will be marked as invisible and will become visible when the hidden superior node is un-hided.
L'illustration suivante montre ce qui arrive lorsqu'un utilisateur rend visible un nœud ayant un ancêtre invisible. Si le nœud cible n'est plus caché dans une sous-arborescence actuellement invisible (parce qu'un nœud, plus haut dans la hiérarchie a été explicitement caché) alors le nœud ne devient pas visible. Il est, au contraire, marqué invisible et ne deviendra visible que lorsque le nœud plus haut dans la hiérarchie ne sera plus caché.
Unhiding a node with an invisible ancestor
Ne plus cacher un nœud ayant un ancêtre invisible
Table des matières
- Content management -- Gestion de contenu
- Datatypes -- Types de données
- The content class -- La classe de contenu
- Class attributes -- Attributs de classe
- The content object -- L'objet de contenu
- Object versioning -- Gestion des versions des objets
- Multiple languages -- Plusieurs langues
- The content node -- Le noeud de contenu
- The content node tree -- L'arbre de noeuds de contenu
- Top level nodes -- Noeuds de niveau supérieur
- Node visibility -- Visibilité des noeuds
- Object relations -- Relations entre objets
- Sections -- Les sections
- URL storage -- Stockage d'URL
- Information collection -- Collecte d'informations
Commentaires














