Two related menu

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
kroki
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 06, 2012 11:31 am

Two related menu

Post by kroki »

I have a site with a structure:
3. (Section Header, not visible in the menu)
3.1 (Content)
3.2 (Content)
3.2.1 (Content)
3.2.2 (Content)
3.2.3 (Content)
3.3 (Content)
3.4 (Content)
3.4.1 (Content)
3.4.2 (Content)
3.5 (Content)
3.5.1 (Content)
3.5.2 (Content)
3.5.3 (Content)

I have a horizontal menu:
{menu loadprops=0 template='KonsaltingMeni' start_element='3' number_of_levels='1' collapse='1'}

I need a vertical menu. It will display subpages of the selected page in the horizontal menu.

I found in the Help:
(optional) start_level="2" - This option will have the menu only display items starting a the given level. An easy example would be if you had one menu on the page with number_of_levels='1'. Then as a second menu, you have start_level='2'. Now, your second menu will show items based on what is selected in the first menu.
I failed. Which code to call the vertical menu?

P.S.
I have a solution with multiple templates.
For example (pages: 3.2 3.2.1 3.2.2 3.2.3)
{menu loadprops=0 template='KonsaltingMeni' start_element='3.2' }

Is there a solution that does not make any more templates?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Two related menu

Post by Dr.CSS »

start_level='2' should show the children 3. (Section Header, not visible in the menu), 3.1 etc...

{menu start_level='2'}
kroki
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 06, 2012 11:31 am

Re: Two related menu

Post by kroki »

Is there a possibility to display vertical menu with subpages of the selected page in the horizontal menu?
rooon
Forum Members
Forum Members
Posts: 113
Joined: Mon Dec 05, 2011 4:40 pm

Re: Two related menu

Post by rooon »

Hoi kroki,

See example template "Top simple navigation + left subnavigation + 1 column"

Top menu:
{menu loadprops=0 template='simple_navigation.tpl' number_of_levels='1'}

Left menu:
{menu loadprops=0 template='simple_navigation.tpl' start_level='2' collapse='1'}

And the rest in the stylesheet...

Have fun, Rooon
kroki
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 06, 2012 11:31 am

Re: Two related menu

Post by kroki »

On page 3.1 display:

3.1 (Content)
3.2 (Content)
3.3 (Content)
3.4 (Content)
3.5 (Content)

On page 3.2 display:
3.1 (Content)
3.2 (Content)
3.2.1 (Content)
3.2.2 (Content)
3.2.3 (Content)
3.3 (Content)
3.4 (Content)
3.5 (Content)

I want:
- For page 3.1 no menu.

- For page 3.2:
3.2 (Content)
3.2.1 (Content)
3.2.2 (Content)
3.2.3 (Content)
rooon
Forum Members
Forum Members
Posts: 113
Joined: Mon Dec 05, 2011 4:40 pm

Re: Two related menu

Post by rooon »

Hi,

Try this: {menu .... start_level="2" childrenof="$page_alias"}

Have fun, Rooon
kroki
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 06, 2012 11:31 am

Re: Two related menu

Post by kroki »

Hi Rooon,
Thank you. Your solution works.
Not how I imagined, but it works.

On page 3.1 no menu. It is OK.
On page 3.2 vertical menu do not dislpay 3.2, display:
3.2.1 (Content)
3.2.2 (Content)
3.2.3 (Content)
Do you know how to display and 3.2?
If there is no way to display 3.2 and this is good.

Once again thank you!!!
kroki
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 06, 2012 11:31 am

Re: Two related menu

Post by kroki »

Oh no ...
This does not work for 3.2.1 3.2.2 and 3.2.3.
No menu is displayed.

I think I'll have to work with multiple templates.
rooon
Forum Members
Forum Members
Posts: 113
Joined: Mon Dec 05, 2011 4:40 pm

Re: Two related menu

Post by rooon »

Hi kroki,

On page 3.2 vertical menu do not dislpay 3.2
<ul id="ulthispage">
<li class="....."><a href="{root_url}/{$page_alias}">{menu_text}</a></li>
</ul>
{menu .......}
- You have to add some css for this solution.
- If you don't use pretty urls, then use {root_url}/index.php?page={$page_alias}

Issue with 3.2.1 3.2.2 and 3.2.3
What {menu ....} parameters do you use?

Roon
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Two related menu

Post by Dr.CSS »

{menu start_level='2'} used with a top level menu will only show if there are children of the active top level menu item no matter what level they are in, it should be all you need, well maybe collapse='1' so all 3 child levels don't show at once...
Post Reply

Return to “Modules/Add-Ons”