exposition Posted October 30, 2006 Share Posted October 30, 2006 I was wondering if anyone can point me in the right direction to how I can highlight a link in a navigation menu to indicate the page a user is on.Changing the style for the highlighted link is easy, but what I want to do is disable or remove the hyperlink for the nav button that relates to the page the user is on at the moment. For example, if you are on the homepage, the 'Home' link should be disabled.How would I do this using one header for the entire website. I don't want to have a menu in each directory, it should be dynamic.Thanks, Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 31, 2006 Share Posted October 31, 2006 $_SERVER['HTTP_REFERER']look it up to make sure, but I think that's it, I don't remember.,You see what page you wantfor instance if you want the homepage to not show up on the homepage then something likeif ($_SERVER['HTTP_REFERER'] != "public_html/index.php") {?>show link<?php}?>osmething along those line's you may have to echo the server variable on the page's you need to find out what the exact path is going to be. Quote Link to comment Share on other sites More sharing options...
trq Posted October 31, 2006 Share Posted October 31, 2006 $_SERVER['PHP_SELF'] not $_SERVER['HTTP_REFERER'] Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 31, 2006 Share Posted October 31, 2006 That's right, I only used it once. I normally don't even use php_self but I started recently.I also didn't mean referer, I was meaning to say request_uri Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.