Forums / Setup & design / switch on childs of a parent node id
M M
Monday 14 February 2005 4:09:25 am
Hi all
In the coming code i'm making the condition on the current node which is the parent_node
But i need to do it on the current node when it is the child node to a specific other parent node..
So can anyone please help me??
{let children=fetch('content','list', hash('parent_node_id',$node.node_id )))}
{switch match=$node.node_id} {case match=64} here goes the first option{/case}
{case} Here goes the second option {/case}{/switch}
Thanks in advance
Ćukasz Serwatka
Wednesday 02 March 2005 12:26:58 am
Hi,
You can fetch parent of current node using {$node.parent_node_id}
For example
{let parentNode=fetch( content, node_id, $node.parent_node_id ) } {$parentNode.name} {/let}
I hope it will help.
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog