WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: CodeALot on June 26, 2009, 03:45:51 PM

Title: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
Post by: CodeALot on June 26, 2009, 03:45:51 PM
Guys, I need help. But first, let's talk about WebsiteBaker and Show_menu2  :-D

I have a page-structure for two seperate sections of the site. Both seperate sections have their own template, because I assume I will have to call the menu in two different ways.
This is the page structure:


PRIVATE (menu-link to home)
           home
           contact
           page3
BUSINESS (menu-link to home)
           businesshome
           businesscontact
           businesspage3
  


Now, I want to call Show_menu2 in such a way that it will only show either the three options of the PRIVATE menu, or only the three options in the BUSINESS section of the menu.

I've tried this one:
Code: [Select]

            <?php show_menu2(0SM2_ROOT+1SM2_ALLSM2_ALL|SM2_CURRTREEfalse"\n</li>"falsefalsefalse, &#39;<ul id="header_menu" class="menu">&#39;); ?>

But somehow it seems that "CURRTREE" is ignored. With this call, ALL SIX of the options are shown in each menu.

Please....... HELP!
Title: Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
Post by: Ruud on June 26, 2009, 05:08:06 PM
You could tell show_menu2() to start building his menu from a certain page.

Use:
show_menu2(0, 123, SM2_ALL, SM2_ALL,....);
where 123 is the pageid of the menu-link pages.

Both templates will have a different starting point (page_id), so that should do the trick.
I used this approach in multi language sites too.

R
Title: Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
Post by: CodeALot on June 26, 2009, 07:56:51 PM
You're the best. Thanks Ruud! I managed to talk my way out of the deadline, so I gained some time to figure it out.
I did multilanguage menus before, but those weren;t Show_menu2 menus... And I needed a drop-down now too, so I got myself into trouble.

Thanks again Ruud, I'll let you know how it turned out!
Title: Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
Post by: CodeALot on June 29, 2009, 09:50:37 AM
Ruud?

You rule. :)
Title: Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
Post by: Ruud on June 29, 2009, 09:53:32 AM
I assume it worked?  8-)

R
Title: Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
Post by: CodeALot on June 29, 2009, 01:42:56 PM
Yep, it works :) You saved my day.  :-D