Symlinking content (solved)

Author Message

Wednesday 22 December 2004 3:18:09 am

I know it is possible to copy content, but is it possible to symlink content so that content can be presented several places on a site ?
If so you only have to update the content one place.

Ulrich L.

Wednesday 22 December 2004 3:37:12 am

This is a very basic feature of ezp. E.g. you can place a node (= content carrier) at several different locations. When changing the content, the changes will appear at the different locations. It is that what you were asking for?

Balazs Halasy

Wednesday 22 December 2004 4:39:43 am

Hi,

A kind of symbolic linking (creation of shortcut) is possible by assigning several nodes to the same object. This is easily done by the addition of an extra location (add new location from within the admin interface). However, please keep in mind that this feature does not support symlinking on a subtree/recursive basis. Let me demonstrate...

Let's say you have the following objects:

1: Root folder
2: News folder
3: Sports folder
4: Article one
5: Article two

..and that you've set up the following node tree:

   A
   |
  -+-
 /   \
B     C
      |   
     -+-
    /   \
   D     E

In other words, you'll have the following node assignments:

Node A ---> Object 1
Node B ---> Object 2 
Node C ---> Object 3
Node D ---> Object 4
Node E ---> Object 5

(Node A points to object 1, node B points to object 2, and so on.)

Okay, now, let's say you want to make the object that is pointed to by node C (object 3) available under node B. Okay, you'll simply add a node assignment (using the locations panel from the admin interface). The result will be:

Nodes & objects:
----------------

Node A ---> Object 1 (Root folder)
Node B ---> Object 2 (News folder)
Node C ---> Object 3 (Sports folder)
Node D ---> Object 4 (Article one)
Node E ---> Object 5 (Article two)
Node F ---> Object 3 (Sports folder)  *NEW LOCATION*


Your node tree would look like this:
------------------------------------

       A
       |
      -+-
     /   \
    B     C
    |     |   
    F    -+-
        /   \
       D     E

In other words, you have successfully placed the Sports folder under the News folder at the same time as it is also availalbe at its original location (directly below the root). However, notice that the children of the Sports folder were not symlinked.

Conlcusion:
Object symlinking is possible but only on a per-object-basis and not recursively. It is important to keep this in mind whenver you're sketching out / planning the node tree of an upcoming eZ publish site. A lot of people fall into the same pitfall over and over again, thinking that symlinking is possible just like it would be on a filesystem.

Balazs

Wednesday 22 December 2004 5:10:23 am

OK, thanks a lot.
This was the feature I was looking for but was not aware of.

-
Hans-Henry

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.