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.

 

[Solved] - Exclude module from specific page

[Solved] - Exclude module from specific page

Hi,
Using metamod I can allocate a module to a menu and then tell it to display on only one page in the menu but I don't know how to get the mod to display on all pages except one or two  specific pages.

I had a look at this tutorial http://www.metamodpro.com/metamod/recip … mart-pages
but can't follow it for my situation which is not relevant to virtuemart.

This is the code from the two pages I wish not to have the module:

if (
$option == 'com_jreviews'
and $view == 'directory'
and $Itemid == '118'
) return 91; /* replace XXX with the module ID or position to display */

and

if (
$option == 'com_content'
and $view == 'featured'
and $Itemid == '101'
) return 91; /* replace XXX with the module ID or position to display */

Thanks

Edited By: Drunkmodpro
12-Nov-12 11:30:13

Drunkmodpro
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: [Solved] - Exclude module from specific page

Hi, that's a great question. Try it this way:

$test1 = (
  $option == 'com_jreviews'
  and $view == 'directory'
  and $Itemid == '118'
);
$test2 = (
  $option == 'com_content'
  and $view == 'featured'
  and $Itemid == '101'
);

if (!$test1 and !$test2) return 91; /* i.e. if it's not on page 1 AND not on page2, then show module */


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:
1667
Total Polls:
6
Total Posts:
5910
Total Posts Today:
1
User Info:
 
Total Users:
10144
Newest User:
leonard5412396
Members Online:
2
Guests Online:
148


Forum Legend:

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