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.

 

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

cc.com
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Exclude all modules right and left in the following VM pages

Hi,
sorry for my very slow reply sad

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

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10789
Newest User:
parus6
Members Online:
1
Guests Online:
229

Online: 
parus6

Forum Legend:

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