building treemenu when contet belong to different section

Author Message

Leeloo Dalas

Thursday 09 June 2005 1:06:54 am

Hello all!
here is treemenu

{* Set your top category here *}
{let top_cat=2
     used_node=false()}

{section show=is_set($DesignKeys:used.node)}
        {set used_node=$DesignKeys:used.node}
{section-else}
        {set used_node=$top_cat}
{/section}

{* Get a proper node object *}
{let node_obj=fetch(content,node,hash(node_id,$used_node))}

{* FIRST LEVEL *}
{section loop=fetch(content,list,hash(parent_node_id,$top_cat, class_filter_type, "include", class_filter_array, array(1),sort_by,array(array(priority))))}
- <a class="path" href={concat("/content/view/full/",$:item.node_id,"/")|ezurl}>{$:item.name}</a><br />

        {* SECOND LEVEL *}
        {section show=$node_obj.path_array|contains($:item.node_id) loop=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1),sort_by,array(array(priority))))}
                -- <a class="path" href={concat("/content/view/full/",$:item.node_id,"/")|ezurl}>{$:item.name}</a><br />

                {* THIRD LEVEL *}
                {section show=$node_obj.path_array|contains($:item.node_id) loop=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1),sort_by,array(array(priority))))}
                        --- <a class="path" href={concat("/content/view/full/",$:item.node_id,"/")|ezurl}>{$:item.name}</a><br />

                        {* FOURTH LEVEL *}
                        {section show=$node_obj.path_array|contains($:item.node_id) loop=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1),sort_by,array(array(priority))))}
                                ---- <a class="path" href={concat("/content/view/full/",$:item.node_id,"/")|ezurl}>{$:item.name}</a><br />
                        {/section}
                {/section}
        {/section}
{/section}
{/let}
{/let}

All content is separeted into 2 section
1. Standart (allowed for all)
2. Partners (allowed only for partners(registered users) and need autorization)

All content items in tree are children of one node (id=2), but they belong to differnt sections.

Usining this code in menu only menu-points that belong to Standart section are shown.

But i also need menu-points that are links for conten in partners section.

Can i show this links ( not manually)?

 

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 15:52:12
Script start
Timing: Jan 18 2025 15:52:12
Module start 'layout'
Timing: Jan 18 2025 15:52:12
Module start 'content'
Timing: Jan 18 2025 15:52:13
Module end 'content'
Timing: Jan 18 2025 15:52:13
Script end

Main resources:

Total runtime1.0201 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.3047152.6563
Module start 'layout' 0.00710.0038 741.960939.5078
Module start 'content' 0.01091.0077 781.4688445.4297
Module end 'content' 1.01870.0014 1,226.89848.0938
Script end 1.0201  1,234.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3682160.0002
Check MTime0.00170.1651160.0001
Mysql Total
Database connection0.00070.071510.0007
Mysqli_queries0.974995.5729460.0212
Looping result0.00050.0452440.0000
Template Total0.981496.220.4907
Template load0.00220.217420.0011
Template processing0.979295.992320.4896
Template load and register function0.00020.016910.0002
states
state_id_array0.00110.108310.0011
state_identifier_array0.00110.105220.0005
Override
Cache load0.00180.1734160.0001
Sytem overhead
Fetch class attribute can translate value0.00120.115510.0012
Fetch class attribute name0.00080.083320.0004
XML
Image XML parsing0.00110.112210.0011
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00170.1619160.0001
String conversion0.00000.003240.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs