Author Topic: show actual Level  (Read 1280 times)


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

I fot the menu i need in this Thread:,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){
} else {

Or is there any nicer way to do that?



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

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