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}