Tree menu

Author Message

Matej Franc

Sunday 24 August 2003 12:32:15 pm

I want use tree menu for navigation trought my site. This mean that my tree menu must be able to show all subfolders and infopages, articles, product informations, but not links ect…
Have someone idea how can I solve this.
Thanx

Bjørn Kaarstein

Monday 25 August 2003 2:37:29 am

This might help you. It does a tree fetch, and creates a simple tree based structure. As you can see, this only goes for folders.

{let folderlist=fetch('content', 'tree' ,hash('parent_node_id', 2,
'class_filter_type', include,
'class_filter_array', array(1)))}
<div align="center">

<table border="1" width="150" bgcolor="#f6f6f6" cellpadding="1" cellspacing="0" align="center">

{section name=menu loop=$folderlist}

{switch match=$menu:item.depth}

{case match=2}
{section show=eq($menu:index, 0)}
</td></tr>
{/section}
<tr>
<td>
 <a href={$menu:item.url_alias|ezurl}>{$:item.name}</a>

{/case}

{case match=3}
{section show=and($node.depth|ge(2),eq($menu:item.parent_node_id, $node.path_array.2))}

 <a href={$menu:item.url_alias|ezurl}><br />  -- {$:item.name}</a>

{/section}
{/case}

{case match=4}
{section show=and($node.depth|ge(3),eq($menu:item.parent_node_id, $node.path_array.3))}

 <a href={$menu:item.url_alias|ezurl}><br />    --- {$:item.name}</a>

{/section}
{/case}

{/switch}
{/section}
</td>
</tr>
</table>
</div>
{/let}

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 22:34:43
Script start
Timing: Jan 18 2025 22:34:43
Module start 'layout'
Timing: Jan 18 2025 22:34:43
Module start 'content'
Timing: Jan 18 2025 22:34:44
Module end 'content'
Timing: Jan 18 2025 22:34:44
Script end

Main resources:

Total runtime1.5332 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 587.7891152.6094
Module start 'layout' 0.00710.0028 740.398439.3984
Module start 'content' 0.00991.5214 779.7969471.4531
Module end 'content' 1.53130.0018 1,251.25008.2031
Script end 1.5331  1,259.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.2793160.0003
Check MTime0.00180.1171160.0001
Mysql Total
Database connection0.00170.108910.0017
Mysqli_queries1.479996.5275540.0274
Looping result0.00050.0332520.0000
Template Total1.496397.620.7481
Template load0.00380.249920.0019
Template processing1.492497.342620.7462
Template load and register function0.00020.011610.0002
states
state_id_array0.00180.120010.0018
state_identifier_array0.00210.138320.0011
Override
Cache load0.00310.2034460.0001
Sytem overhead
Fetch class attribute can translate value0.00130.083020.0006
Fetch class attribute name0.00130.085420.0007
XML
Image XML parsing0.00020.014620.0001
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00060.0407100.0001
String conversion0.00000.000440.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs