tree menu navigation

Author Message

Sean O'Reilly

Wednesday 10 January 2007 1:10:33 pm

Hi Guys

I am new to ezpublish and am trying to build a treemenu for my navigation but am getting nowhere fast.

I have basically created 5 folders with various content inside and am trying to create my navigation from these.

Below is the content of my navigation.tpl file.

<div id="navigation">
  {let folder_list=fetch( content, list, hash(parent_node_id, 2, sort_by, array( array ( priority ))))}

<ul>
   {section name=top_level loop=$folder_list} 
   <li>
   <a href={concat("/", $folder2:item.url_alias)|ezroot}>{$folder2:item.name|wash}</a>

   {section show=$top_level:item.node_id|eq($module_result.path[1].node_id)}

   {let sub_folder_list=fetch( content, list, hash(parent_node_id, $module_result.path[1].node_id, sort_by, array( array( priority ))))}

<ul>
   {section name=sub_level loop=$top_level:sub_folder_list}
   <li><a href={concat("/",$top_level:sub_level:item.url_alias)|ezroot}>{$top_level:sub_level:item.name|wash}</a></li>
   {/section}
</ul>
{/let}
{/section}
</li>
{/section}
</ul>
{/let}
</div>

Can anyone give me a few pointers as to where i might be going wrong, it would be much appreciated.

Thanks

Sean

Eirik Alfstad Johansen

Tuesday 16 January 2007 9:26:36 am

Hi Sean,

What, if anything, does this code output?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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 03:41:42
Script start
Timing: Jan 19 2025 03:41:42
Module start 'layout'
Timing: Jan 19 2025 03:41:42
Module start 'content'
Timing: Jan 19 2025 03:41:44
Module end 'content'
Timing: Jan 19 2025 03:41:44
Script end

Main resources:

Total runtime1.4867 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.0055 589.1484152.6250
Module start 'layout' 0.00550.0031 741.773439.4453
Module start 'content' 0.00861.4766 781.2188521.2656
Module end 'content' 1.48530.0013 1,302.48448.3281
Script end 1.4866  1,310.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2376160.0002
Check MTime0.00130.0874160.0001
Mysql Total
Database connection0.00100.067110.0010
Mysqli_queries1.441996.9877540.0267
Looping result0.00080.0514520.0000
Template Total1.448897.520.7244
Template load0.00230.152420.0011
Template processing1.446697.302820.7233
Template load and register function0.00020.010210.0002
states
state_id_array0.00090.060110.0009
state_identifier_array0.00200.137220.0010
Override
Cache load0.00190.1286150.0001
Sytem overhead
Fetch class attribute can translate value0.00090.062020.0005
Fetch class attribute name0.00130.086030.0004
XML
Image XML parsing0.00070.044120.0003
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00080.0556160.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
3content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs