August 13, 2008 at 5:52 am #22991
I have intregated a menu and used a php included :Code:< ? php include('menu.php'); ?>
Now i have a problem because i want to integrate anCode:id=”current”
to the menu item of the visited page. Is there a solution for this?
Thanks for the help!August 13, 2008 at 12:07 pm #49108
This reply has been reported for inappropriate content.
The best way to go here is to not use unique ID’s on the list items, but on the body element itself. That way your "included" menu code never needs to change. More on this:
https://css-tricks.com/id-your-body-for- … ecificity/August 14, 2008 at 8:10 am #49200
I asked a very similar question a while back and got given this code to use the file name to dynamically load the body id’s.Code:< ?php $fname = basename($_SERVER['PHP_SELF'], ".php"); ?>
Thought it might help . . .
You must be logged in to reply to this topic.