| 7:52 am on Oct 4, 2007 (gmt 0)|
Can be done in two steps:
> grab the current URL
> Write conditions on the links as to when should a link appear bold
If you provide more details, you will get more specific answers.
| 9:55 am on Oct 4, 2007 (gmt 0)|
If someone is on index.php I'd like to output:
<span class="currentpage"><a href="index.php">Home</a></span>
otherwise just output:
| 11:37 am on Oct 4, 2007 (gmt 0)|
Have a look at [webmasterworld.com...]
[edited by: PHP_Chimp at 11:38 am (utc) on Oct. 4, 2007]
| 4:24 pm on Oct 4, 2007 (gmt 0)|
echo " id=\"currentpage\"";?>>
The downside is each page has to be assigned a value for $thispage. Could this be done automatically somehow with just php?
| 4:37 pm on Oct 4, 2007 (gmt 0)|
Yea, if ur using different scripts for navigation. i think this would at least point you in the right direction
//then index.php is current
//then pagex is current
other wise if ur navigation is more dynamic, such as using "index.php?page=pagex" to navigate, u can use the $_GET['page'] to get the current page
| 8:18 pm on Oct 8, 2007 (gmt 0)|
this could really be done with css easier than with php...just name the class of your nav the same as your page and then use a flag, like body id="" and name it the same as the class you want highlighted, then check in css and highlight...