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.

 

display module that depends on the article

display module that depends on the article

hello

I would like to know how to display a module in an article.
it displays the modules it depends on the menus. but I would like to display the module it depends on the article.

I installed the module. but I have not successfully configure the module in an article do not have a relationship with a menu item.

thanks .

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

Re: display module that depends on the article

Hi bzakaria,

if you want the module to display IN the article, you might need to use the {loadposition xxx} syntax to load in a certain position/module, or use the "Articles Anywhere" extension at nonumber.nl to be able to select it by ID rather than module position.

If you want to simply display a module in a normal module position, but change it according to article ID, then MetaMod is your friend.

You can do this very easily.
1 - follow basic setup instructions on this page: http://www.metamodpro.com/metamod/quick-start (you need to understand the basic way it works)
2 - use the following recipe in your PHP rule:

if ($content_genius->check("article_id = AAA") ) return XXX;

replace AAA with the article ID number, and XXX with the module id to use.

If you want to display the same module for more than one article, then you can do the following:

if ($content_genius->check("article_id = AAA, BBB, CCC, DDD, EEE") ) return XXX;

(basically, just make a comma-separated list of article IDs to use that module ID)

If you want to make a list of different module IDs for different article IDs, then you can do it a couple of different ways:

if ($content_genius->check("article_id = AAA") ) return XXX;
if ($content_genius->check("article_id = BBB") ) return YYY;
if ($content_genius->check("article_id = CCC") ) return ZZZ;
// etc.... just add more rules as necessary

or, more efficiently, this way:

$article_id = $content_genius->info("article_id");
if ($article_id == AAA) return XXX;
if ($article_id == BBB) return YYY;
if ($article_id == CCC) return ZZZ;
// replace AAA, BBB, CCC with article ids to check for, and XXX, YYY, ZZZ with the module ids to use for them.

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4384
Newest User:
rash39381
Members Online:
0
Guests Online:
164

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