Left Menu not displaying properly

Author Message

Kevin Myles

Wednesday 28 July 2004 6:58:20 am

I'm trying to create a left menu that will only fetch the subfolders a certain node (109), and then work as a normal left menu.
So far, it works fine when you are on the home page, any other page, or on the node itself, however, when you get into one of the subfolders, or a subsubfolder, or an article placed in a subsubfolder, the left menu displays itself twice. The nodes are organized like this
(Here is the set up of the folder with the node id of 109):

109 Issues
--110 Refugees
-------111 News
------------120 Article A
------------120 Article b
-------112 reports
--113 Political Prisoners
-------114 News
-------115 reports
--116 Relgious Persecution
-------117 News
-------118 Reports

Okay, so if you are in a subfolder, subsubfolder, or article, it displays the 109 node twice, like this, if for example, you were reading a report in the religious persecution folder:
:
-Refugees
---Refugees
---Political Prisoners
---Religious Persecution
-Political Prisoners
-Religious Persecution
----News
----Reports

feel free to check out http://www.uhrp.org/cms/index.php/news/issues/economics_and_culture/headlines/uighurs_lose_out
now, here is the code. Any suggestions would be much appreciated:

  
{let docs=treemenu( $module_result.path,
                    109,
                    array( 'folder' ), 1, 5 )
                    depth=1}
<b>::Issues of Concern::</b>         <ul>
     
        {section var=menu loop=$:docs last-value}
            {section show=and( $menu.last.level|eq( $menu.level ), $menu.number|gt( 1 ) )}
                </li>
            {section-else}
            {section show=and( $menu.last.level|gt( $menu.level ), $menu.number|gt( 1 ) )}
                </li>
                    {"</ul>
                </li>"|repeat(sub( $menu.last.level, $menu.level ))}
            {/section}
            {/section}

            {section show=and( $menu.last.level|lt( $menu.level ), $menu.number|gt( 1 ) )}
                <ul>
                    <li class="menu-level-{$menu.level}">
            {section-else}
                <li class="menu-level-{$menu.level}">
            {/section}

  <a {$menu.is_selected|choose( '', 'class="selected"' )} href={$menu.url_alias|ezurl}>{$menu.text|shorten( 35 )}</a>

            {set depth=$menu.level}
        {/section}
           </li>

        {section show=sub( $depth, 0 )|gt( 0 ) loop=sub( $depth, 0 )}
            </ul>
        </li>
        {/section}
        </ul>

{/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 19:38:20
Script start
Timing: Jan 18 2025 19:38:20
Module start 'layout'
Timing: Jan 18 2025 19:38:20
Module start 'content'
Timing: Jan 18 2025 19:38:20
Module end 'content'
Timing: Jan 18 2025 19:38:20
Script end

Main resources:

Total runtime0.7117 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.0062 587.9375152.6250
Module start 'layout' 0.00620.0031 740.562539.4453
Module start 'content' 0.00920.7012 780.0078417.8594
Module end 'content' 0.71040.0012 1,197.86728.1563
Script end 0.7116  1,206.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4216160.0002
Check MTime0.00130.1804160.0001
Mysql Total
Database connection0.00110.148410.0011
Mysqli_queries0.673394.6022460.0146
Looping result0.00040.0623440.0000
Template Total0.679595.520.3397
Template load0.00210.298520.0011
Template processing0.677495.178220.3387
Template load and register function0.00020.033310.0002
states
state_id_array0.00130.187910.0013
state_identifier_array0.00110.158120.0006
Override
Cache load0.00180.2460310.0001
Sytem overhead
Fetch class attribute can translate value0.00080.109910.0008
Fetch class attribute name0.00070.092610.0007
XML
Image XML parsing0.00010.012810.0001
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00070.0928100.0001
String conversion0.00000.001240.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/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: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs