The content node tree
The content node tree is a hierarchical organization of the objects. Each leaf in the tree is a node (also known as a location). Each node refers to one object. The usual case is that an object is referenced by only one node. Because of the node-encapsulation of objects, any type of content object can be placed anywhere in the tree. At the minimum, the tree consists of one node, called the root node. The identification number of the root node is 1. The root node is a virtual node, it does not encapsulate an actual object. A node that is directly below the root node is called a top level node (the top level nodes are described in the next section). The depth and width of the tree is virtually unlimited. The following illustration shows a simplified example of how objects are referenced by nodes which together make up the content node tree.
Objects, nodes and the content node tree
The following illustration shows the same node structure seen from the outside world.
Content node tree
Multiple locations
An object may be referenced by several nodes, which means that the same object can appear at different locations within the tree. This feature can for example be used to place a specific news article at two locations: the frontpage and the archive. In the case of multiple nodes/locations, only one node can be considered as the main node of an object. The main node usually represents the object's original location in the tree. The other nodes can be thought of as additional nodes / locations. If an object is referenced by a single node then of course that node would be the main node. Among other things, the main node is used to avoid multiple search hits, infinite recursive loops, smart filtering, etc. The following illustration shows an example of a structure where an object has multiple locations in the tree. It will simply be empty and will have the possibility to contain a different set of sub items.
Objects, node and the content node tree - multiple locations
The following illustration shows the same node structure seen from the outside world.
Content node tree with multiple locations
Pitfall
A very common mistake when planning the structure of a site is thinking of multiple locations as shortcuts/links on a filesystem. Unfortunately, this is not how the node tree works. When a new location is added to an object, eZ Publish will not go through and create replica of the node structure below the object's original location. For example, if a folder containing several subfolders with articles, images, etc. is assigned a secondary location, the subfolders with articles, images, etc. will not be automatically available below the new location of the folder.
Additional notes
Only published objects appear in the tree. A newly created object (status set to draft) does not get a node assignment until the object is published for the first time. An object is considered to be deleted (status set to archived) when all nodes referencing that object are removed from the tree. A deleted object will appear in the system trash. It is important to understand that the trash in eZ Publish is a flat structure. This is different from what people are used to from the trash implementation in modern operating systems. When an object is to be recovered/undeleted, it must be manually placed in the tree since the deleted object doesn't contain any information about its previous location. For example, if a folder containing some news articles is deleted, both the folder and the articles will appear on the same level within the trash. Recovering the folder itself will not bring back the articles since the links between the folder and the articles got lost when the nodes were deleted.
Balazs Halasy (31/01/2005 12:41 pm)
Balazs Halasy (25/04/2005 9:40 am)
Comments
Not adding additional locations to sub items
Thursday 09 February 2006 1:03:34 pm
William Steenbergh
The fact that eZ Publish does not copy sub items when adding a location to the parent node, is rather illogical. I would like to make a request to make it a functionality in future releases (or optional at the very least)
What good is it to add a location to a folder when its sub items are not copied.
If I am abusing this fumction and I should use another, please be free to tell me.
tata
William
Re: Not adding additional locations to sub items
Friday 10 February 2006 5:53:48 pm
Mark Marsiglio
Re: Re: Not adding additional locations to sub items
Monday 20 February 2006 10:46:53 am
Ciprian Popovici
And secondly, once you do this, is there a danger of creating infinite loops, or does ez prevent them internally by default?
Re: Re: Re: Not adding additional locations to sub items
Sunday 24 June 2007 3:35:46 pm
Rahul Khanna
Re: Not adding additional locations to sub items
Friday 29 January 2010 1:24:35 am
al
Re: plss help me
Friday 29 January 2010 1:27:21 am
al
i was a student of marikina.
i want to know how?