My menu looks like this:
Menu1
Menu2
-Submenu1
-Submenu2
Menu3
-Submenu1
-Submenu2
Menu4
Now, if I click Menu 2, Menu 3 and Menu 4 are gone, but Menu 1 is still there.
If I click Menu 3, Menu 4 is gone but Menu 1 and Menu 2 are still there.
But what I want is that if I click Menu 2 that all other Menus (not submenus) are still visible.
Demo:
http://tinyurl.com/y9rwtpm
And here's the corresponding .CSS file:
Code: Select all
<ul class="menu_horiz">
{assign var="firstsub" value="1"}
{assign var="depth" value="1"}
{assign var="depthcheck" value="0"}
{assign var="listopened" value="0"}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $depthcheck == 1 && $node->depth != $node->prevdepth}
{assign var="depth" value=$node->depth}
{assign var="depthcheck" value="0"}
{assign var="listopened" value="1"}
</ul>
{/if}
{if $node->depth == $depth && $firstsub == 1}
<li>
<a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
{$node->titleattribute}</li>
{elseif $listopened == 0}
{assign var="firstsub" value="0"}
{/if}
{if $node->current == true && $node->haschildren == true}
{assign var="depthcheck" value="1"}
{/if}
{/foreach}
{if $listopened == 0}
</ul>
{/if}
{/if}
Thanks !