![]() |
IF then question about root level categories
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 |
Re: IF then question about root level categories
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:
{foreach from=$categories item=c} Notice the if statement within the a tag. Hope that helps you somewhat. regards W. |
All times are GMT -8. The time now is 02:12 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.