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.

eZ debug

Timing: Jan 18 2025 16:12:20
Script start
Timing: Jan 18 2025 16:12:20
Module start 'layout'
Timing: Jan 18 2025 16:12:20
Module start 'content'
Timing: Jan 18 2025 16:12:21
Module end 'content'
Timing: Jan 18 2025 16:12:21
Script end

Main resources:

Total runtime0.6272 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.7891152.6094
Module start 'layout' 0.00490.0022 740.398439.4063
Module start 'content' 0.00710.6187 779.8047534.1641
Module end 'content' 0.62580.0014 1,313.96888.1953
Script end 0.6271  1,322.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5202160.0002
Check MTime0.00140.2153160.0001
Mysql Total
Database connection0.00060.096410.0006
Mysqli_queries0.584693.2210590.0099
Looping result0.00050.0844570.0000
Template Total0.601195.820.3006
Template load0.00210.334120.0010
Template processing0.599095.510820.2995
Template load and register function0.00020.031710.0002
states
state_id_array0.00070.117510.0007
state_identifier_array0.00110.170520.0005
Override
Cache load0.00170.2768170.0001
Sytem overhead
Fetch class attribute can translate value0.00070.116230.0002
Fetch class attribute name0.00260.408440.0006
XML
Image XML parsing0.00070.115030.0002
class_abstraction
Instantiating content class attribute0.00000.005840.0000
General
dbfile0.00070.1053160.0000
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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs