Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



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?

Beginner Modder
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.


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 Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

3319 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Total Posts Today:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

Forum Legend:

 New Sticky