Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 09:37:09 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
149686 Posts in 21102 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: show actual Level  (Read 267 times)
c0de

Offline Offline

Posts: 16


« on: March 13, 2010, 08:57:10 PM »

Hey there again!

I fot the menu i need in this Thread:
http://www.websitebaker2.org/forum/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);
}

Or is there any nicer way to do that?

Thx
greetz
Logged
c0de

Offline Offline

Posts: 16


« Reply #1 on: March 14, 2010, 12:48:37 AM »

ok...

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

Not fine but works...
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!