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.9 R24 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 »
  • Current menu ID. How to display it
  • Print
Pages: [1]   Go Down

Author Topic: Current menu ID. How to display it  (Read 4086 times)

Offline maxxis

  • Posts: 36
Current menu ID. How to display it
« on: September 23, 2009, 01:42:10 PM »
Hi guys

Is there a way to display the menu id of the current page that you are on?

For example in info.php I have menu[3] defined as "support"

How do I detect that 3 in the template?

Is this possible?

I really need a way to do it otherwise Im screwed on the whole menu system. :mrgreen:
Logged

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: Current menu ID. How to display it
« Reply #1 on: September 23, 2009, 01:49:09 PM »
include the info.php in your template. Thebn you have access to the variables

Dietmar
Logged
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

Offline maxxis

  • Posts: 36
Re: Current menu ID. How to display it
« Reply #2 on: September 23, 2009, 02:09:37 PM »
Thanks

That will give me all the variable yes but how do I detect the menu id of the current page?
Logged

aldus

  • Guest
Re: Current menu ID. How to display it
« Reply #3 on: September 23, 2009, 02:52:58 PM »
You can get this info from the $wb-object, e.g.
Code: [Select]
<?php

if ($wb->menu_number === 3) echo "call number 3";

?>


Regards
Aldus
Logged

Offline maxxis

  • Posts: 36
Re: Current menu ID. How to display it
« Reply #4 on: September 23, 2009, 03:02:40 PM »
Just figured it out also.

Thanks so much for the help.

I found $wb->page['menu']; to do the trick
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Current menu ID. How to display it
 

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