Ok I got this to work since no one would do it

! I'm by no means a programmer but I it works so hey that counts right?
My solution to this problem was to change the templates CSS class based on the location of the user while browsing the store. The CSS modification is easy, you simple create an default non active class and an active class.
For example:
Code: Select all
a.homeoff{
display: block;
width: 42px;
height: 33px;
background: url(../image/homeoff.gif) 0 0 no-repeat;
text-decoration: none;
}
a.homeoff:hover{
background-position: -42px 0;
}
a.homeactive{
display: block;
width: 42px;
height: 33px;
background: url(../image/homeactive.gif) 0 0 no-repeat;
text-decoration: none;
}
Now you'll need to find the location being visited by the user by using PHP's predefined variable REQUEST_URI.
For testing purposes you can echo REQUEST_URI by using
Code: Select all
<?php echo $_SERVER['REQUEST_URI'] ?>
Finally you'll need to use PHP's conditional IF and ELSE statements to change the class based on REQUEST_URI
Code: Select all
<?php if ($_SERVER['REQUEST_URI'] == '/') { ?><?php echo 'class="homeactive"' ?><?php } ?><?php if ($_SERVER['REQUEST_URI'] == '/controller/home') { ?><?php echo 'class="homeactive"' ?><?php } else { ?><?php echo 'class="homeon"' ?><?php } ?>
Depending on if you have SEO URL's enabled or not you'll need to change the URI to whatever your server supports.
Hope this helps!
Thanks,
Grim