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 modules based on template

Display modules based on template

Hello

I use joomla 3.2 and later versions of metamodpro and chamaleon.
I'm not able to set this parameter.

I need that module only appears in the template I want. How do I do that?

Thanks for helping
Jpalu

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

Re: Display modules based on template

Hi Jpalu,

Try this:

Code:

$mainframe = JFactory::getApplication();

$template = $mainframe->getTemplate();
if ($template == 'protostar') return XXX;
// replace XXX with module id of module to appear ONLY on protostar template.

Note that this is only the name of the template, not the template style.

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

Re: Display modules based on template

(that's code for MetaMod, by the way)

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

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
1
User Info:
 
Total Users:
5351
Newest User:
rosas54448
Members Online:
1
Guests Online:
129

Online: 
rosas54448

Forum Legend:

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