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.

 

Return multiple modules

Return multiple modules

Hello all,

A simple question, but how do I show multiple modules when one condition is true, such as that below.

if (
$option == 'com_users'
and $view == 'login'
and $Itemid == NULL
) return 106;

if (
$option == 'com_users'
and $view == 'login'
and $Itemid == NULL
) return 105;

It only displays the first. How can I combine these results??

Thanks in advance

Alec

alecthorne
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Return multiple modules

Hello all,

I have looked further through the forum posts, but cannot find a way to do this. I am sure I have achieved this before. Modules 106, 105 (and possibly more) should be displayed on the same condition

$option == 'com_users'
and $view == 'login'
and $Itemid == NULL

How do I achieve this. Apologies if this is a beginners question..

Alec

alecthorne
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Return multiple modules

Easy - return both module ids, comma separated, in quotes.

e.g.

if (
  $option == 'com_users'
  and $view == 'login'
  and $Itemid == NULL
) return "106, 105";


Cheers
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

Re: Return multiple modules

Perfect!!

Thank you Stephen!!

alecthorne
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4421
Newest User:
rajajudi14
Members Online:
0
Guests Online:
180

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