Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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

lt635
Beginner Modder
ranks
useravatar
Offline
11 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5173
Newest User:
nycphoto22
Members Online:
2
Guests Online:
112


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked