PHP - Highlight current page on menu



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


.



Relevant Pages

  • Re: newbie: webservices ???
    ... > selling on my site (sport articles). ... some clients asked me a way to put their object ... > directly on a page on their web site, to avoid to set the articles twice, ... > My site is in PHP with a Mysql database. ...
    (alt.php)
  • insert multiple records into one table (one form)
    ... Please excuse my limited technical knowledge of PHP, ... created PHP sites using Dreamweaver, i find know that i need features ... I am trying to create a 'related articles' selection page. ... This is all covered in Dreamweavers features, but, what i ...
    (comp.lang.php)
  • Re: Web server security
    ... The problem I see is that most PHP is poorly written. ... Many of the PHP articles ... fundamental problems with the language or interpreters. ... This mirror happens to be from ...
    (comp.os.linux.security)
  • Re: webservices newbie question
    ... > PHP webservice. ... My php service is on a .PHP file, ... My site sells used sport articles. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Running php and java on IIS5/IIS6?
    ... I have articles on setting up PHP on IIS 6 here: ... Only reply by newsgroup. ... > Does anyone know if it is possible to run php and java on an IIS5/IIS6? ...
    (microsoft.public.inetserver.iis)