Sunday 01 August 2004 10:29:34 am
I have created a custom left menu so it displays the subfolders of a particular node (109). It looks great except when you select the a subfolder, subsubfolder, or an article of 109, when it displays everything fine, but also displays the subfolders of node 109 under the first subfolder like so:
sub a
-sub a
-sub b
-sub c
sub b
sub c sub d A moderator via email suggested I compare the current $menu.node_id against the currently displayed node ($DesignKeys:used.node) and its parent node ($DesignKeys:used.parent_node). (see below) But unfortunately, this hasn't worked.
below is the code. Please take some pity and help! Thanks.
{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=ne( array( $DesignKeys:used.node, $DesignKeys:used.parent_node ),contains( 109 ) )}
{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, 1 )|gt( 0 ) loop=sub( $depth, 1 )}
</ul>
</li>
{/section}
{/section}
</ul>
{/let}
|