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.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


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 »
  • show actual Level
  • Print
Pages: [1]   Go Down

Author Topic: show actual Level  (Read 3558 times)

c0de

  • Guest
show actual Level
« on: March 13, 2010, 08:57:10 PM »
Hey there again!

I fot the menu i need in this Thread:
https://forum.WebsiteBaker.org/index.php/topic,17511.0.html

This Question is something really else, but comes from the same problem, so i hope a new thread is ok.

I have this Struktur:
- Root Page
-- Subpage 1
-- Subpage 2

Now (with some big Help) i get to show Root Page + Subpages in one Menu when i clicked the Root page

The Next Problem is i need to know the Level where i am at the Moment, couse when i now get to "Subpage 1" the Root Page link is not shown any more in the Menu, so i think i need something like that:
Code: [Select]
if ($level = 1){
 show_menu(1);
} else {
 show_menu(2);
}

Or is there any nicer way to do that?

Thx
greetz
Logged

c0de

  • Guest
Re: show actual Level
« Reply #1 on: March 14, 2010, 12:48:37 AM »
ok...

now counting the "/"
Code: [Select]
substr_count($_SERVER['SCRIPT_NAME'], '/')
Not fine but works...
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show actual Level
 

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