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.

 

Can metatemplate change template parameter?

Can metatemplate change template parameter?

Hi there,

I have used metatemplate for a long time. It is a very powerful extension. I have a question that can it change template parameter? For example, my joomla use T3 version1 template. And I want to change the menu in megamenu. First, when user visites site by PC, they will see "main menu". Then he visits by mobile, T3 will switch to mobile layout automatically. But in mobile layout I want to display "mobile menu" but not "main menu". So I am very pleasure that metatemplate can detect mobile and change T3 menu parameter to switch from "main menu" to "mobile menu". Can metaemplate do that?

Cheers,
Mcwolf

mcwolf00
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: Can metatemplate change template parameter?

Sorry that menu is not a good example. How about style, on PC it is style1 and on mobile it should be style2.

mcwolf00
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: Can metatemplate change template parameter?

Hi Mcwolf,

I haven't looked very closely at any T3v1 templates, so it's hard to say for sure.

Certainly with some other templates I've been able to make a small tweak to the template code that picks up a global variable. In the MetaTemplate SUCCEED action you can set the global variable as a result of the rule; therefore you can control it from MetaTemplate.

If you're controlling styles, then there's a chance it might be able to work another way. Is it possible to change the style via a parameter in the URL? e.g. http://mysite.com/mypage?style=VARIATION1   ?
If so, then you can sort of magically add this extra URL parameter in the SUCCEED action:

JRequest::setVar("style", "VARIATION1");

... however this is only going to work if it's already possible to change style via URL. I don't know if T3v1 allows this.

I hope that might suggest some directions to try.

Best regards,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Re: Can metatemplate change template parameter?

Hi metamodguy,

Thank you for your suggestion, I will have a try.

Cheers,
Dennis

mcwolf00
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: Can metatemplate change template parameter?

Hi metamodguy i gave it a try for bringing variations in the template through url and succeeded in it.

jamesblack
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Can metatemplate change template parameter?

Just out of interest, what kind of template was it? JA T3, YooTheme, Gantry…?

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

Re: Can metatemplate change template parameter?

It was YooTheme...

jamesblack
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Can metatemplate change template parameter?

That's great - thanks for the confirmation.

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

Board Info

Board Stats:
 
Total Topics:
1680
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10831
Newest User:
bluesky1
Members Online:
0
Guests Online:
162

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