Fetching Node id

Author Message

John Smith

Thursday 10 April 2008 1:20:30 am

Hi There,

Hope someone can help.

On my site the menu structure is:

Root
    |--->Folder 1
               |------>Folder2
                            |-----> Folder 3

Is it possible to fetch folder2 node id while in folder1 and folder3. I am trying $module_resut.path[2].node_id, but it is not working.

Please help.

Cheers.

Michal Slocinski

Friday 11 April 2008 2:59:26 pm

where do you want to fetch this node?

in some node view override or page layout file?

kubus media

Friday 20 June 2008 6:17:24 am

Hi John
by $node.parent.node_id ($node.parent contains the whole ezcontentobjecttreenode of F1). Folder 3 is a subitem, so you can't identify it directly (there could be more than one subitem). You need to fetch the children of "Folder 2" ($node.children or fetch('content', 'list', hash('parent_node_id', $node.node_id, ........... )). If theres just one subitem $node.children.0.node_id could be working.

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