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.

 

How to have a module appear on a number of pages...

How to have a module appear on a number of pages...

I just want to have a module appear on 5 specific pages - how do I do that?

asdfasdf
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: How to have a module appear on a number of pages...

Hi asdfasdf,

You'll need to be a bit more specific. For many components you can adapt the PHP output from Advanced Debug Mode in MetaMod. There are hundreds of recipes for particular scenarios in the Recipes section: http://www.metamodpro.com/metamod/recipes

In general, if you want a module to appear on more than one type of page you will need to do one of three things:

1 - just stack the different recipes in the PHP code, one after the other. If the first one doesn't match, then MetaMod will look at the next one until it gets to the bottom.

e.g.

if ( condition here.... ) return XXX:
if ( another condition here... ) return XXX;
if ( condition 3 here... ) return XXX;

2 - if you know a little PHP, and if the conditions aren't too complex, then you might be able to combine them all into 1 "if" statement:

if ( condition1  or  condition2  or  condition3 ) return XXX;

3 - if you're using JomGenius to detect a particular thing like which page type you are on, you can just make a list of the different values you want to detect, and the rule will succeed if any of them match:

if ( $core_genius->check("pagetype = frontpage, article, articleedit, categoryblog") ) return XXX;

Hope that helps,
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:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
192

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