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.

 

Hide module from some pages of 2 different components

Hide module from some pages of 2 different components

Hi,
first wanna say thanks for this wonderful thing which is metamod! its a really great and helpful module.

Im quite new with this. I would like to hide a module from the component user on reset and remind pages so i tried this :
if ( ! (
$option == 'com_user'
and $view == 'reset'
or $view == 'remind'
) ) return 110;
which is working like expected!
but i also wanted to hide this module from the registration page of virtuemart.
I tried this apart from the first code :
$vm = JomGenius("virtuemart");
if ( $vm->check( "pagetype not = shop.registration" ) ) return 110;
which is working fine too!
So im wondering if its possible to mix the 2 things? how can i proceed?

thanks

meyloo
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Hide module from some pages of 2 different components

I'd do it like this:

$vm = JomGenius("virtuemart");
if ( !  // negate the following:
  (
    ( $option == 'com_user'
      and ( $view == 'reset' or $view == 'remind' ) )
    or
    ( $vm->check( "pagetype = shop.registration" ) )
  )
) return 110;

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

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
1
User Info:
 
Total Users:
5361
Newest User:
scotti64d
Members Online:
0
Guests Online:
157

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