Jump to content

Header Help


exposition

Recommended Posts

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,
Link to comment
Share on other sites

$_SERVER['HTTP_REFERER']
look it up to make sure, but I think that's it, I don't remember.,
You see what page you want
for instance if you want the homepage to not show up on the homepage then something like
if ($_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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.