Share » Forums » Setup & design » view "siblings"

view "siblings"

view "siblings"

Monday 27 February 2006 6:14:07 am - 4 replies

Author Message

Gabriel Ambuehl

Monday 27 February 2006 6:18:59 am

Shouldn't siblings be:

{$node.parent.children}

?

(Obviously that also lists the current node but it's easy enough to filter that)

Visit http://triligon.org

ole poulsen

Monday 27 February 2006 6:30:46 am

thanks, but sorry, no, that doesn't work. Not in that form that is.

Marko Žmak

Wednesday 01 March 2006 1:57:06 pm

In what way did you try this code?

If you want sibilings of a node $node then try:

{foreach $node.parent.chidren as $child}
{$child.name}
{/foreach}

If you want sibilings of an object $object then try:

{foreach $object.main_node.parent.chidren as $child}
{$child.name}
{/foreach}

Also remember that each object can have more than one parent node, so it can have different sibilings for different parent nodes.

Also have a look at this:

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/objects/ezcontentobject

http://ez.no/doc_hidden/ez_publish/technical_manual/3_6/reference/objects/ezcontentobjecttreenode

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

ole poulsen

Thursday 02 March 2006 4:14:23 am

Yay! It works now, thanks!

Except you forgot a 'l' in 'children' - just in case someone is going to copy-paste this code, it should of course be:

{foreach $node.parent.children as $child}
{$child.name}
{/foreach}

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

36 542 Users on board!

Forums menu