Hi,
I didn't find the solution to show the parent menu in a submenu.
For example, this is my hierarchy :
- Menu 1
- Menu 2
- Menu 2.1
- Menu 2.2
- Menu 2.3
- Menu 3
- Menu 3.1
- Menu 3.2
- Menu 3.3
etc...
I want to show a menu with the first current level (for example "Menu 2") and all the child menu, i.e. :
menu 2 | menu 2.1 | menu 2.2 | menu 2.3
And when I'm on the Menu 3, this is switched on :
menu 3 | menu 3.1 | menu 3.2 | menu 3.3
thanks a lot
[resolved] sub-menu with parent
[resolved] sub-menu with parent
Last edited by tynmar on Mon Jan 15, 2007 10:29 am, edited 1 time in total.
Re: sub-menu with parent
Ok, but when I'm on the menu 2, it shows me :
menu 1 | menu 2 | menu 2.1 | menu 2.2 | menu 2.3 | menu 3 | etc ...
And i just want to see menu 2 and its children when I'm on menu 2.
menu 1 | menu 2 | menu 2.1 | menu 2.2 | menu 2.3 | menu 3 | etc ...
And i just want to see menu 2 and its children when I'm on menu 2.
Re: [resolved] sub-menu with parent
Make a new menu template just for the Level 1 header above your side menu. Use code like this:
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->current == true or $node->parent == true}
{* ADD WHAT YOU WANT TO DISPLAY AS A HEADER HERE *}
{/if}
{/foreach}
{/if}
In this menu template, replace the comment line with the HTML/Smarty code that displays what you want in your menu header. You can make your own, or just copy/paste from your side menu template.
Then, in your page template, add {menu start_level ='1' number_of_levels='1'} just before your side {menu}. That's it.
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->current == true or $node->parent == true}
{* ADD WHAT YOU WANT TO DISPLAY AS A HEADER HERE *}
{/if}
{/foreach}
{/if}
In this menu template, replace the comment line with the HTML/Smarty code that displays what you want in your menu header. You can make your own, or just copy/paste from your side menu template.
Then, in your page template, add {menu start_level ='1' number_of_levels='1'} just before your side {menu}. That's it.