WebsiteBaker Support (2.8.x) > Templates, Menus & Design

show actual Level

(1/1)

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:

--- Code: ---if ($level = 1){
 show_menu(1);
} else {
 show_menu(2);
}
--- End code ---

Or is there any nicer way to do that?

Thx
greetz

c0de:
ok...

now counting the "/"

--- Code: ---substr_count($_SERVER['SCRIPT_NAME'], '/')
--- End code ---

Not fine but works...

Navigation

[0] Message Index

Go to full version