PHP - Highlight current page on menu
- From: "bp" <bp@xxxxxx>
- Date: Sun, 1 May 2005 00:18:29 +1000
Hi there,
My site is: www.polliweb.com
I have just rejigged my site so that the navigation is centralised into the
one file which is called by a PHP include within each page. I've also
included code so that the current page will be highlighted by the menu.
The code I've used to do this is as follows:
<li<?php if ($thisPage=="Stuff")
echo " id=\"currentpage\""; ?>>
And I've added the following to each page so that it can be "identified"
and highlighted in the menu.
<?php $thisPage="Stuff"; ?>
If you click on STUFF on the main menu, then click on any of the articles on
the page you will notice that the current page is no longer highlighted on
the menu. I understand that these articles are like sub pages to the main
"stuff" page, but all the same, I'd like to have "Stuff" highlighted when
the user is in any of the Stuff pages. I have added <?php
$thisPage="Stuff"; ?> to each of these sub-pages but it still does not work.
Any suggestions on how I can solve this?
Many thanks
--
Brian
.
- Prev by Date: Parsing dates in a variety of formats?
- Next by Date: newbie be patient
- Previous by thread: Parsing dates in a variety of formats?
- Next by thread: newbie be patient
- Index(es):
Relevant Pages
|