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.

eZ debug

Timing: Jan 18 2025 21:05:43
Script start
Timing: Jan 18 2025 21:05:43
Module start 'layout'
Timing: Jan 18 2025 21:05:43
Module start 'content'
Timing: Jan 18 2025 21:05:44
Module end 'content'
Timing: Jan 18 2025 21:05:44
Script end

Main resources:

Total runtime0.6792 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.9141152.6250
Module start 'layout' 0.00580.0023 740.539139.4453
Module start 'content' 0.00810.6699 779.9844566.2891
Module end 'content' 0.67800.0012 1,346.273412.1641
Script end 0.6792  1,358.4375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4423160.0002
Check MTime0.00130.1859160.0001
Mysql Total
Database connection0.00120.182310.0012
Mysqli_queries0.624891.9876620.0101
Looping result0.00060.0872600.0000
Template Total0.648595.520.3243
Template load0.00180.268120.0009
Template processing0.646795.208720.3233
Template load and register function0.00010.016810.0001
states
state_id_array0.00070.101210.0007
state_identifier_array0.00250.366320.0012
Override
Cache load0.00160.2284300.0001
Sytem overhead
Fetch class attribute can translate value0.00060.093630.0002
Fetch class attribute name0.00100.142860.0002
XML
Image XML parsing0.00230.335630.0008
class_abstraction
Instantiating content class attribute0.00000.001970.0000
General
dbfile0.00300.4425220.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs