Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » display module for particalur VM cats...
display module for particalur VM cats and another module elsewhere
display module for particalur VM cats and another module elsewhere
Hi, I'm hoping for a new recipe from the master chef...
Is it possible to to configure MetaModPro to do this all in the same module position?
Display one module for a particular group of VirtueMart categories, display another module for a different group of categories, display a third module for a every other page on the site.
I look forward to seeing if / how this can be done, thanks in advance
Re: display module for particalur VM cats and another module elsewhere
Yes, JomGenius to the rescue...
Let's assume that you're going to identify the categories directly, rather than ancestor categories. The following example will display on category pages (where the category is the one listed in each case) and also on product pages, where the product is in the category listed.
$vm = JomGenius("virtuemart");
if ( $vm->check("category_ids = 3, 4, 5, 6") ) return XXX;
if ( $vm->check("category_ids = 7, 8, 9") ) return YYY;
return ZZZ; // any page on the site not matching the previous 2 lines
Replace XXX, YYY and ZZZ with the appropriate module ids to return in each case.
Hope that helps,
Stephen
Re: display module for particalur VM cats and another module elsewhere
Hi Stephen, thanks so much for your help, I'd be stuck without you and MetaMod Pro! Sorry for my slow reply.
The code works beautifully, check it out here (beware it's an underwear site!)
There is a module for all Mens categories, another for Women and a third one for everywhere else.
Thanks again Stephen your a legend!
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » display module for particalur VM cats...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5941
- Posts this week:
- 1
- User Info:
- Total Users:
- 7618
- Newest User:
- goure1dhowen
- Members Online:
- 0
- Guests Online:
- 150
- 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