| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Highlight current menu item | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Highlight current menu item
Hello!
How do I make the menu to highlight the category where I▓m currently in (underline, bold)?
__________________
X-Cart version 4.5.5 |
|||||||||
#2
|
|||||||||
|
|||||||||
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.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#3
|
|||||||||
|
|||||||||
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.
|
|||||||||
|
#4
|
|||||||||
|
|||||||||
Re: Highlight current menu item
Quote:
Thank you Alex! But where is that 'category rendering loop'? My code looks like that: Code:
__________________
X-Cart version 4.5.5 |
|||||||||
#5
|
|||||||
|
|||||||
Re: Highlight current menu item
As Cherie says...
Code:
__________________
xcartmods.co.uk |
|||||||
|
#6
|
|||||||||
|
|||||||||
Re: Highlight current menu item
Close!
Code:
|
|||||||||
|
#7
|
|||||||||
|
|||||||||
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!
__________________
X-Cart version 4.5.5 |
|||||||||
#8
|
|||||||
|
|||||||
Re: Highlight current menu item
Fantastic! Thank you!
__________________
www.scraporchard.com X-Cart Pro Version 4.5.5 Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters Gahela: Gahela Support System The xCart Store: xBanners, xAccess, xMenus |
|||||||
#9
|
|||||||
|
|||||||
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
__________________
4.1.11 x-SpecialOffers |
|||||||
#10
|
|||||||||
|
|||||||||
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?
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
|
|||
X-Cart forums © 2001-2020
|