show actual Level

c0de

ok...

now counting the "/"
substr_count($_SERVER['SCRIPT_NAME'], '/')

Not fine but works...

c0de

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:
if ($level = 1){
show_menu(1);
} else {
show_menu(2);
}


Or is there any nicer way to do that?

Thx
greetz