peasepud
Programmer
- Jul 20, 2007
- 35
Hi,
I have a site with a navigation menu bar, the CSS includes a class of .chosen to highlight the page you are on, the navigation is built using an unordered list and the selected item marked as such:
<li><a href="index.php" class = "chosen">Home</a></li>
<li><a href="page2.php">Next page</a></li>
This works fine however I now want to keep the site fresh and easy to update by including the navigation bar in a php require statement to ease any changes etc. This obviously breaks the ability to set the class on each page.
Is there any other way people can see to do this? If its not possible then Im happy to sacrifice the styling to keep it easier to update but would prefer like to have this style if possible.
I have a site with a navigation menu bar, the CSS includes a class of .chosen to highlight the page you are on, the navigation is built using an unordered list and the selected item marked as such:
<li><a href="index.php" class = "chosen">Home</a></li>
<li><a href="page2.php">Next page</a></li>
This works fine however I now want to keep the site fresh and easy to update by including the navigation bar in a php require statement to ease any changes etc. This obviously breaks the ability to set the class on each page.
Is there any other way people can see to do this? If its not possible then Im happy to sacrifice the styling to keep it easier to update but would prefer like to have this style if possible.