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
- » Exclude all modules right and left in...
Exclude all modules right and left in the following VM pages
Exclude all modules right and left in the following VM pages
Joomla 1.5.10
VM - 1.13
MetaMod v2.12, 2011-10-31
MetaMod Pro plugin v2.6, 6 September 2010 is installed and enabled.
JomGenius v12 is provided by MetaMod
Hi I would like to exclude all modules right and left in the following VM pages.
shop.cart, shop.product_details, checkout.index#1, checkout.index#2, checkout.index#3, checkout.index#4, checkout.thankyou
Unfortunatly I can not shift these modules in to new module positions as they are used in other parts of the site.
The left module ids to hide are
44, 45, 95
The right module ids hide are
94, 127
Any suggestions for php code to use as spent hours getting know where!
Thanks
Re: Exclude all modules right and left in the following VM pages
Hi,
sorry for my very slow reply
Here's a good way to do it since you have the Pro version installed:
1 - set up your modules so that they show at least on all the pages that you want them to display on. They will also display on the pages you don't want them on, but we'll remove those in the next step.
2 - Create a new MetaMod and assign it to all pages. In the PHP box, write:
$vm = JomGenius("virtuemart");
if ($vm->check("pagetype = shop.cart, shop.product_details, checkout.index#1, checkout.index#2, checkout.index#3, checkout.index#4, checkout.thankyou")) {
foreach (array(44,45,95,94,127) as $m) {
$changes->mod($m)->disable();
}
}
What this code does is to check if the page is on one of the VM page types you listed. If it is, it runs through each of the modules you listed and disables them.
Best regards,
Stephen
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Exclude all modules right and left in...
Board Info
- Board Stats:
- Total Topics:
- 1700
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 8052
- Newest User:
- maarie443
- Members Online:
- 0
- Guests Online:
- 173
- 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