Share » Forums » Setup & design » Show topfolders name in right column.

Show topfolders name in right column.

Show topfolders name in right column.

Monday 14 July 2003 6:23:27 am - 2 replies

Author Message

Claire Lin

Thursday 17 July 2003 12:09:33 am

The attribute
$node.path_array or $node.path contains the info of all the parent nodes down to the current node.
For example, {$node.path[0].name} will show "Root Folder", {$node.path[1].name} will probably be "News" (if your News object is one level under Root Folder).

You can use {$node|attribute(show)} in the template, then you will see the values of $node.path_array or $node.path.

Claire

Valentin Svelland

Thursday 17 July 2003 1:34:47 am

Thanks Claire!
I'm sure this is the solution. As you say {$node.path[0].name} shows the root folders name, and {$node.path[1].name} my level "MySite".

However {$node.path[2].name} doesn't return "News", "Sports" and so on. No output, just a blank line. weird.. Trying to figure out why. The names exist so I can't understand why [2] doesn't return "News" as in my structure / Root Folder / MySite / News..

Ok, I found this error in debug:
----------------------------------
Error: eZTemplate @

design/mysite/override/templates/pagelayout_mysite.tpl:330[24] Jul 17 2003 10:50:33
No such attribute for array(2): 3
Choose one of following: 0, 1

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu