Determine the current page name?
Posted: Wed May 30, 2007 2:34 pm
I have what is probably a super basic question, but it is something I have never seemed to need to do before, and must not be using the right Key words with google.
I have a very simple menu. On the home page I don't want it to display "Home" but I do on all the other pages. Like wise I want "About Us" to display on all the pages but the About page.
So in short I need to do the following:
if not current page = "index.php" display home link;
if not current page = "about.php" display about link;
etc...
Any ideas on how to do this? I came across some examples in my google research, but they all were very complicated and lengthy for what seams should be a simple one line of code per link.
I have a very simple menu. On the home page I don't want it to display "Home" but I do on all the other pages. Like wise I want "About Us" to display on all the pages but the About page.
So in short I need to do the following:
if not current page = "index.php" display home link;
if not current page = "about.php" display about link;
etc...
Any ideas on how to do this? I came across some examples in my google research, but they all were very complicated and lengthy for what seams should be a simple one line of code per link.