treemenu

Author Message

Salvatore Guarino

Thursday 17 November 2005 8:37:37 am

This is code for my default treemenu:

treemenu( $module_result.path, 
          node_id
          [, class_filter ]
          [, depth_skip   ]
          [, max_level    ] )

It's possible to specify the path of another node? (not the current)

What I have to write instead "$module_result.path"?

Bye,

Salvatore

Ɓukasz Serwatka

Friday 18 November 2005 1:19:32 am

You can fetch node by id and pass $node.path as first parameter.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Salvatore Guarino

Tuesday 22 November 2005 1:03:36 am

Dear Luke,

I try to follow your advice. It works, but I have a little problem with current node parameter. I used this code:

{def $my_node=fetch( 'content', 'node', hash( 'node_id', 616 ) )}
{let docs=treemenu( $my_node.path,

                    616,

                    array('folder', 'file','article', 'pdfw'), 1, 4 )

                    depth=1

                    last_level=0}

I would like to show a menu where selected node is the 616 (at 3th level), skipping the first level. It doesn't work correctly. I can view only parent node of 616, and other nodes that are in same level of this one, but 616 is not selected and not visible in menu. Any idea?

Bye,

Salvatore

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 19:29:22
Script start
Timing: Jan 18 2025 19:29:22
Module start 'layout'
Timing: Jan 18 2025 19:29:22
Module start 'content'
Timing: Jan 18 2025 19:29:23
Module end 'content'
Timing: Jan 18 2025 19:29:23
Script end

Main resources:

Total runtime1.1229 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.7891152.6094
Module start 'layout' 0.00590.0031 740.398439.3906
Module start 'content' 0.00901.1125 779.7891546.2188
Module end 'content' 1.12150.0014 1,326.007812.2031
Script end 1.1228  1,338.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2942160.0002
Check MTime0.00130.1191160.0001
Mysql Total
Database connection0.00090.081310.0009
Mysqli_queries1.062594.6203570.0186
Looping result0.00060.0540550.0000
Template Total1.087796.920.5439
Template load0.00230.200820.0011
Template processing1.085596.670020.5427
Template load and register function0.00010.009110.0001
states
state_id_array0.00090.083910.0009
state_identifier_array0.00130.119820.0007
Override
Cache load0.00190.1672210.0001
Sytem overhead
Fetch class attribute can translate value0.00090.078820.0004
Fetch class attribute name0.00200.182050.0004
XML
Image XML parsing0.00120.108620.0006
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00100.0885250.0000
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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 6

Time used to render debug report: 0.0001 secs