How to get the current level in path ?

Author Message

B Pierre

Thursday 16 September 2010 7:14:04 am

Hi,

I begin with Ezpublish and i would like to know with which function or variable can I get the current level of a page in path ?

Thanks.

Gabriel Finkelstein

Thursday 16 September 2010 9:21:48 am

If you're in pagelayout.tpl:

{$module_result.content_info.node_depth}

or

{$module_result.path|count}

http://ez.no/doc/ez_publish/technical_manual/4_x/templates/the_pagelayout/variables_in_pagelayout

If you're in the full or line view of a node:

{$node.depth}

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/objects/ezcontentobjecttreenode

Matthieu Sévère

Friday 17 September 2010 4:41:42 am

You can also you the ezpagedata operator that is bundled with eZ Webin

--
eZ certified developer: http://ez.no/certification/verify/346216

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 10:58:21
Script start
Timing: Jan 18 2025 10:58:21
Module start 'layout'
Timing: Jan 18 2025 10:58:21
Module start 'content'
Timing: Jan 18 2025 10:58:22
Module end 'content'
Timing: Jan 18 2025 10:58:22
Script end

Main resources:

Total runtime1.0133 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.0052 587.9375152.6250
Module start 'layout' 0.00520.0035 740.562539.4453
Module start 'content' 0.00881.0029 780.0078575.8281
Module end 'content' 1.01170.0015 1,355.83598.1563
Script end 1.0133  1,363.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3157160.0002
Check MTime0.00140.1359160.0001
Mysql Total
Database connection0.00060.063410.0006
Mysqli_queries0.962294.9540590.0163
Looping result0.00060.0618570.0000
Template Total0.974296.120.4871
Template load0.00240.236920.0012
Template processing0.971795.900620.4859
Template load and register function0.00020.015210.0002
states
state_id_array0.00170.167710.0017
state_identifier_array0.00120.120320.0006
Override
Cache load0.00200.1948190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.056030.0002
Fetch class attribute name0.00100.095950.0002
XML
Image XML parsing0.00270.267230.0009
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00470.4610220.0002
String conversion0.00000.000840.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
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs