I've been developing a template for my new store and came across one problem. The main navigation on the store is customized and coded into the template (header.tpl) directly, and each link changes background on mouse hover.
Now I would like the link to the "Products" be highlighted when a user is on a product item page or product category page. I've prepared a CSS class for it, but I have no idea how to check whether the current page is a product item/category page or not.
Please help.
Big thanks.
For those of you without much PHP knowledge, I took this concept and added something like this to my header.tpl in the theme file.
This will give you something like
when you're on the category page.
Code: Select all
<?php
$page_route = explode('/',$this->request->get['route']);
$body_class = '';
foreach($page_route as $route){
$body_class .= $route.' ';
}
$body_class = substr($body_class,0,-1);
?>
<body class="<?php echo $body_class; ?>">
Code: Select all
<body class="product category">
when you're on the category page.
Who is online
Users browsing this forum: No registered users and 21 guests