Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » ChameleonLite
- » Sub-categories different template
Sub-categories different template
Sub-categories different template
Hi,
I am setting up a Virtuemart shopping website where I have 2 main categories in the top menu, then a sub-menu and then sub-sub-menus. I need the sub-sub-menus to have a different Joomla template. No matter how I change it, it comes out with one or the other on all pages. I have a 3 column layout for main and sub category and a 2 column layout for the sub-sub-categories.
I have tried using (with category name and number id) but it changes all pages:
if ( $content_genius->check("category_id = various") ) return true;
Any help would be much appreciated!
Thank you
Kind regards
Lene
Re: Sub-categories different template
Hi Lene,
If you're checking for VirtueMart categories, there's a special thing just for them. The category_id you're using above only applies to article categories, not VM categories. (you were on the right track though!)
So try this:
$vm = JomGenius("virtuemart");
if ( $vm->check("ancestor_category_ids = 5")) return true;
What this does is checks all the way up the list of parent and grandparent categories (i.e. "ancestors") for the current VM product. If it finds category "5" in the list of ancestors, it returns true.
You can put in a comma-separated list of category ids to check, and it will return true if any one of them is found.
I *think* this is what you're looking for. Please write back if you need more help.
Best regards,
Stephen
- Index
- » Chameleon / ChameleonLite
- » ChameleonLite
- » Sub-categories different template
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7642
- Newest User:
- mary26
- Members Online:
- 0
- Guests Online:
- 164
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked