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.

 

Module inclusion according to template switcher

Module inclusion according to template switcher

* Which version of Joomla? 1.5.22
    * Which version of MetaMod are you using? 2.6
    * If the recipe concerns other components or 3rd-party components, it would be helpful to have a name and version number, and if possible a URL: mod_templatechooser
url: http://localhost/joomla/index.php?mod_change_template_55=qg_metal_masc_1&&template=qg_metal_masc_1

    * Last but not least, a URL for your own site if it's public: I'm on local with Xampp for now.

***********************

I am trying to include only specific modules according to the template chosen by the user. I am using a module called "mod_templatechooser".

I was trying the following command without any success:

if { $mod_change_template_55 == "qg_metal_masc_1" } return "59,60,61";

btw, is there really a space needed at the beginning and at the end of the brackets?

Thanks, happy holidays.
Alex

Edited By: atherrien
30-Dec-10 06:06:55

atherrien
Modder Extraordinaire
ranks
useravatar
Offline
140 Posts
Administrator has disabled public posting

Re: Module inclusion according to template switcher

Please a reply would be appreciated. I am still looking for a fix to this problem. Thank you

atherrien
Modder Extraordinaire
ranks
useravatar
Offline
140 Posts
Administrator has disabled public posting

Re: Module inclusion according to template switcher

HI Alex,

sorry for the slow reply - I've just got back from (summer!) holidays and am catching up with the support backlog.

There's a recipe for doing this on this page:

http://www.metamodpro.com/metamod/recip … a-template

So you'll end up with something looking like this:

$mainframe =& JFactory::getApplication();
$template =& $mainframe->getTemplate();
if ($template == "qg_metal_masc_1") return "59,60,61"; /* on this template, use these modules */


This technique works no matter which way you change the template - whether using mod_templatechooser, or using the standard Joomla template changing mechanism. (i.e. setting the default template, or assigning different templates to different menu items).


Hope that helps,
Happy New Year,
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

Re: Module inclusion according to template switcher

Thank you Stephen, that solved my problem! I'm buying metamod pro and metaplate pro on the spot. Thanks a lot for these.

atherrien
Modder Extraordinaire
ranks
useravatar
Offline
140 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11570
Newest User:
moises1247
Members Online:
1
Guests Online:
195

Online: 
moises1247

Forum Legend:

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