TreeMenu

Author Message

Carlos Revillo

Tuesday 20 December 2005 10:26:31 am

hi. i'm working with a custom script now. I'm using ezContentObject and ezContentObjectTreeNode for what i need, but i don't find the solution.

What i want is the "breadcrumb" of a node.
I have

Item 1
Item 1.1
Item 1.1.1
Item 1.1.1.1

and i need get the parents of Item 1.1.1.1 via php script, something like Item 1 - Item 1.1 - Item 1.1.1

Thanks a lot

Gabriel Ambuehl

Tuesday 20 December 2005 10:50:59 am

The default page layout does show breadcrumbs, couldn't you simlpy use that or look at it to see how it's down?

Visit http://triligon.org

Pascal von Büren

Wednesday 21 December 2005 3:09:46 am

Maybe I'm getting you wrong, but you can easily loop over a node's path using following code (as seen in page_toppath.tpl):

{foreach $node.path as $pathItem}
    {$pathItem.name}
{/foreach}

where $pathItem is a fully accessible node element, so you can get whatever information you like (url_alias, attributes, ...)

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 19 2025 04:26:24
Script start
Timing: Jan 19 2025 04:26:24
Module start 'layout'
Timing: Jan 19 2025 04:26:24
Module start 'content'
Timing: Jan 19 2025 04:26:26
Module end 'content'
Timing: Jan 19 2025 04:26:26
Script end

Main resources:

Total runtime1.1279 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.0056 590.1406152.6094
Module start 'layout' 0.00560.0029 742.750039.3828
Module start 'content' 0.00851.1182 782.1328565.1328
Module end 'content' 1.12670.0012 1,347.26568.2109
Script end 1.1279  1,355.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2939160.0002
Check MTime0.00130.1113160.0001
Mysql Total
Database connection0.00100.092610.0010
Mysqli_queries1.080695.8078590.0183
Looping result0.00050.0462570.0000
Template Total1.096297.220.5481
Template load0.00210.185220.0010
Template processing1.094197.003020.5471
Template load and register function0.00010.010410.0001
states
state_id_array0.00110.093410.0011
state_identifier_array0.00110.099720.0006
Override
Cache load0.00170.1526190.0001
Sytem overhead
Fetch class attribute can translate value0.00070.060330.0002
Fetch class attribute name0.00110.096140.0003
XML
Image XML parsing0.00190.171330.0006
class_abstraction
Instantiating content class attribute0.00000.002740.0000
General
dbfile0.00280.2486150.0002
String conversion0.00000.000640.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/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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/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: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs