Highlight current menu item
Hello!
How do I make the menu to highlight the category where I▓m currently in (underline, bold)? |
Re: Highlight current menu item
You should modify the "skin/common_files/customer/categories.tpl" template and add {if $c.categoryid eq $cat}style="font-style: bold;"{/if} condition into the category rendering loop.
|
Re: Highlight current menu item
You can also replace $cat with $current_category.categoryid if $cat happens to not be available on the page you are on. It may be a more consistent variable.
|
Re: Highlight current menu item
Quote:
Thank you Alex! But where is that 'category rendering loop'? My code looks like that: Code:
|
Re: Highlight current menu item
As Cherie says...
Code:
|
Re: Highlight current menu item
Close!
Code:
{if $current_category.categoryid eq $c.categoryid} |
Re: Highlight current menu item
Went nuts with these templates!
1. The template path is not ⌠skin/common_files/customer/categories.tpl■ but ⌠skin/common_files/modules/Flyout_Menus/Icons/■ as far as I use Flyout Menus module. 2. I almost got mad trying to figure out why all changes were not displayed on the website. The answer was simple √ I had to clean cash with /cleanup.php. 3. Had to modify the code to Code:
So now the whole <li> block looks like this: Code:
4. ⌠font-style■ didn▓t work out for "underline" so I changed it to ⌠text-decoration■. And finally it works! Thank you guys very much for help! |
Re: Highlight current menu item
Fantastic! Thank you!
|
Re: Highlight current menu item
Anyone know how to do this with 4.1.11? I tried this stuff to no avail. Good info though. Thx
|
Re: Highlight current menu item
Quote:
Thanks this works great. Is it possible to keep the parent category highlighted when a user clicks on a sub-category? |
All times are GMT -8. The time now is 11:59 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.