PDA

View Full Version : category.php show current link as bold


72dpi
12-14-2005, 01:17 AM
Hi All,

I really would love to be able to make the menu item in category.php in my skins file, show which section you are in.
As a test, the similar code would be:

<?php
$categoryid = $_SERVER['REQUEST_URI'];
if ( ($categoryid =="") or ($categoryid =="/index.php?categoryid=1") )
{
$nav1 = "<li><strong>Home</strong></li>";
} else {
$nav1 = "<li><a href=\"index.php?categoryid=1\">Home</a></li>";
}
echo $nav1;

if ( $categoryid =="/index.php?categoryid=2" )
{
$nav2 = "<li><strong>About</strong></li>";
} else {
$nav2 = "<li><a href=\"index.php?categoryid=2\">About</a></li>";
}
echo $nav2;
echo $categoryid;
?>

Obviously, this is not ideal, as we want the section to be dynamic & not defined.

Anyone have a clue on this?
I will muck around on the weekend & see what i come up with. Anyone who feels it is easy, please post up.

Cheers!

IGGY
12-14-2005, 04:52 PM
I saw the exact same code yesterday. I'm also looking for the same thing.