WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
  • Print
Pages: [1]   Go Down

Author Topic: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu  (Read 4576 times)

Offline CodeALot

  • Posts: 579
  • Gender: Male
Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
« 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(0, SM2_ROOT+1, SM2_ALL, SM2_ALL|SM2_CURRTREE, false, "\n</li>", false, false, false, &#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!
« Last Edit: June 26, 2009, 04:10:10 PM by CodeALot »
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
« Reply #1 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
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline CodeALot

  • Posts: 579
  • Gender: Male
Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
« Reply #2 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!
Logged

Offline CodeALot

  • Posts: 579
  • Gender: Male
Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
« Reply #3 on: June 29, 2009, 09:50:37 AM »
Ruud?

You rule. :)
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
« Reply #4 on: June 29, 2009, 09:53:32 AM »
I assume it worked?  8-)

R
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline CodeALot

  • Posts: 579
  • Gender: Male
Re: Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
« Reply #5 on: June 29, 2009, 01:42:56 PM »
Yep, it works :) You saved my day.  :-D
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Desperate! Deadline :-( Show_menu2 - Multiple menu-trees in one menu
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2