Forums / Setup & design / Left Menu not displaying properly

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}

eZ debug

Timing: Jan 18 2025 18:30:48
Script start
Timing: Jan 18 2025 18:30:48
Module start 'content'
Timing: Jan 18 2025 18:30:48
Module end 'content'
Timing: Jan 18 2025 18:30:48
Script end

Main resources:

Total runtime0.7558 sec
Peak memory usage4,096.0000 KB
Database Queries183

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.7344180.8281
Module start 'content' 0.00780.6242 768.5625422.9375
Module end 'content' 0.63200.1238 1,191.5000333.8125
Script end 0.7558  1,525.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5624210.0002
Check MTime0.00150.2015210.0001
Mysql Total
Database connection0.00080.108110.0008
Mysqli_queries0.690391.33271830.0038
Looping result0.00160.21421810.0000
Template Total0.718495.120.3592
Template load0.00240.319120.0012
Template processing0.716094.731420.3580
Template load and register function0.00020.032010.0002
states
state_id_array0.00090.116410.0009
state_identifier_array0.00170.223520.0008
Override
Cache load0.00200.2655310.0001
Sytem overhead
Fetch class attribute can translate value0.00090.121220.0005
Fetch class attribute name0.00050.062210.0005
XML
Image XML parsing0.00050.059920.0002
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00260.3476210.0001
String conversion0.00000.001030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs