Skip to main content

Forums

This topic contains 2 replies, has 0 voices, and was last updated by  Jefke 10 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22991

    Jefke
    Member

    Hi all…

    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 an

    Code:
    id=”current”

    to the menu item of the visited page. Is there a solution for this?

    Thanks for the help!

    #49108

    Chris Coyier
    Keymaster

    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/

    #49200

    adhoc01
    Member

    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 . . .

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star