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.

 

different template for a different category in virtuemart

different template for a different category in virtuemart

i'd like to have a different background colour and assign different menus and show specific items in virtuemart depending on the product category. i've just purchased metatemplate and can see how to change it for the whole component but is there any way i can do this specifically for products within a category?
thanks!

pipedragon72
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: different template for a different category in virtuemart

Hi pipedragon72,

Obviously there are hundreds of combinations of things you might want to use to control MetaTemplate, and there isn't room for all of them on the interface... however I am considering making a special plugin for MetaTemplate Pro that will give a series of different things that you might find most useful. If you want to give me your top 5 wishlist for VM then I might just use them!

Regarding the one you're asking about: exactly which pages do you want this to happen on?

e.g.
1 - are you saying you want this on a category listing page (list of products in a certain category)
2 - or are you asking for it on the Product View page, but only when that product is in a certain category?

Also, when you specify a category, should that change the display on all items that are directly in that category, or should it also affect pages/products that are in child or grandchild categories of that category?

Once you have clarified these things, then I'll basically point you to one of the recipes on the MetaMod page for VirtueMart: http://www.metamodpro.com/support/recip … mart-pages

All you have to do to use these on MetaTemplate Pro is to change the "return 101;" (which in MetaMod, returns the module id to display), with "return true;" or "return false;". This will cause the SUCCEED action or FAIL action to be triggered, then you can set the template to be displayed using the drop-down provided.

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
3328 Posts
User info in posts
Administrator has disabled public posting

Re: different template for a different category in virtuemart

Stephen,

Would it be feasible to have some kind of advanced debug code for metatemplatepro ? the kind that you provided for metamodule ?

It would help on these requests, though I understand that it could be FAR more complicated with templates and number of possibilities

alterna
Beginner Modder
ranks
useravatar
Offline
18 Posts
Administrator has disabled public posting

Re: different template for a different category in virtuemart

The problem is that MetaTemplate's output would occur BEFORE any output from the template, i.e. before the <html> tag, and apart from looking awful and being invalid HTML, can also cause gzipping systems to fail on the site.

What I'd recommend is installing MetaMod, and using the Advanced Debug mode on there to help you to identify pages. You can use the "rules" from Advanced Debug mode almost verbatim in MetaTemplate. At the end of the rule, instead of return XXX; where XXX is a module id, use one of these:

return true; // act as if the rule succeeded
return false; // act as if the rule failed
return "beez"; // act as if the rule succeeded, and set the "beez" template
return "beez:continue"; // act as if the rule succeeded, but set the beez template, and force the next rule to be evaluated

Cheers,
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
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4378
Newest User:
miller2341
Members Online:
2
Guests Online:
199


Forum Legend:

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