2 rules help me... :)

2 rules help me... :)

Hello, i try to make a rule that i want to show a module only to a some virtuemart categories and a template to some of virtuemart categories.

When i create a module in which menu i have to publish it or if this is unpublish with the rule it will be show it to the specific category that i choose in the rule? (i create a module and choose to show it to every page or to a specific page?)

I want to show a template when someone link to my site and when he link to woman clothes category(includes all virtuemart pages like product page, checkout page etc) I want to show a new website template, a template to man clothes category with a different website template and a kids clothes category with a different website template.

Re: 2 rules help me... :)

Hi Damian,

You mentioned that you want to change templates AND modules - can I assume that you are also using MetaTemplate, or MetaTemplate Pro?

Let's look at the modules first:

1 - I call the module that you want to show, the "target module". When you set up the target module, set it to "none" menu items. Otherwise, it's going to show up on the pages that you assign it to, and MetaMod won't be able to control that.

2 - Create the MetaMod and set it to ALL pages. The PHP code we use in MetaMod will control exactly which pages it finally appears on.

3 - In the MetaMod, use a rule like this to identify which categories that module should appear on. The module will appear on browse pages and product_details pages, as long as the category is correct:

Create a new rule for each template that you want to apply (e.g. one for Men's clothes, one for Women's clothes).

In each rule, simply type in the category ids of the VM categories that you want to use that template. The field is named "Category id(s)" in the VirtueMart section. If you want the template to be active for that category and all categories below it, use the "Ancestor Category id(s)" field instead.

Then in the SUCCEED action, select the template that you want to use for those categories.

I hope that helps - please write back if you need any more help with it.

Best regards,
Stephen

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