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.

 

$fromCountryId -- return different articles (no modules)

$fromCountryId -- return different articles (no modules)

Hello,
I want to show different articles for different countries.
(more introductory texts on various articles)
How to implement such a design?

if ( $fromCountryId == "US" ) return article_1;
else if ( $fromCountryId == "CN" ) return article_2;
else return article_3;

Thanks
Dmytro

diim
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: $fromCountryId -- return different articles (no modules)

Hi Dmytro,

MetaMod only deals with modules. It doesn't have any control over articles, at least as long as they are being displayed using the normal article/menu mechanism.

Depending on your setup however, you could arrange for the articles to be displayed inside modules. There will be some modules in the Joomla Extensions Directory which can display an article. So, once you have some different modules that each display a different article, then you can use MetaMod to decide which one of them should appear on a page. You might want to make a standard article page with a "blank" article in it and make the modules appear in a module position immediately below it. Or, you could use the {loadposition user1} syntax inside the "blank" article to load in a module position that contains the MetaMod, which in turn loads some of your other articles.

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

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Total Posts Today:
1
User Info:
 
Total Users:
11557
Newest User:
pitbull911
Members Online:
3
Guests Online:
211


Forum Legend:

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