| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
IF then question about root level categories | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Is there a way to determine what Root Level category that a sub category is under.
What i'm trying to do is a tabbed navigation. If the category page you are is under a certain root category, then highlight a certain tab. is there such a thing as If category = x then style="current" Thanks in advance for your help. Lyn
__________________
Lyn Askin X-Cart 4.2.3 MICR Toner Toner Cartridges X-Cart Search Engine Optimization |
|||||||||
#2
|
|||||||
|
|||||||
![]() You could try
{$cat} This variable contains the parent category id of the current category or product page you might be viewing. For example, you could loop through your standard category array $categories and perform a check for a match like this: Code:
Notice the if statement within the a tag. Hope that helps you somewhat. regards W.
__________________
The xCart Store.com - Professional x-cart modules and x-cart templates xMenus, Predictive Search, xBanners2, Busy Kitchen, xtreme Gear, Modern Living, xMobile - Smartphone template & Responsive x-cart template x-cart 3.x.x x-cart 4.x.x |
|||||||
|
|||
X-Cart forums © 2001-2020
|