Jump to content

PHP Include menu


svdb

Recommended Posts

I'm building an website and I would like to include my menu, that is on all the pages, by using PHP. I've only one problem. When you're are on a page the menu item that linkes to that specific page has an different color.I now did this by giving the menu item a class="active". Can I include my menu with php and still be able to have these highlighted menuitems?thank you

Link to comment
Share on other sites

  • 2 weeks later...

MEGA BUMP!!!jkloth, when you say "use a POST or GET variable" I'm assuming that's something along the lines of having a code which gets the name of the page?Is it something relatively simple where somewhere in the page, you have a php code block which declares the name of the page, and then in the nav include file, you have another php code block that says get the names of these pages, and format the current page according to the stylesheet linked in the page?Thanks.EDIT: Scratch that, sorry for the bump. I've found a pure CSS solution. I'd be welcome to share if asked. It's quite ingenious actually...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...