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.

 

Use Chameleon to switch YooTheme "profiles"

Use Chameleon to switch YooTheme "profiles"

After a request from a user, I tested to find out how to use Chameleon to switch between the "profiles" that you can set up in YooTheme's Warp template framework.

That is, in YooTheme you can set up different "profiles" for the template. These are a bit different from Joomla Template "styles" (J2.5). So if you have set up several of these profiles in your template, how would use use Chameleon to switch between them?

Easy!

In the PHP box in the SUCCEED or FAIL action of your Chameleon rule (remember, Joomla 2.5 only), enter the following:

JRequest::setVar("profile","orange");

... where "orange" was the name of the profile I had created in the Warp back-end.

I also needed to activate "Allow profiles to be loaded by URL".


This is really easy to set up and gives Chameleon even more flexibility in choosing which YooTheme profile to use without having to assign these to different menu items. e.g. you could use Chameleon to assign these profiles to different devices, or times of the day, or GeoIP countries, etc etc.

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: Use Chameleon to switch YooTheme "profiles"

Where did you activate - "Allow profiles to be loaded by URL".?  Is it in the chameleon rule - Paste URL box?

Tijj
Beginner Modder
ranks
useravatar
Offline
18 Posts
Administrator has disabled public posting

Re: Use Chameleon to switch YooTheme "profiles"

Nope, that's one of the options in the Warp back-end, or at least it was in the template that I was testing with.

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: Use Chameleon to switch YooTheme "profiles"

oh - Its "Dynamic Profiles" (Yes/No). Got it.

Tijj
Beginner Modder
ranks
useravatar
Offline
18 Posts
Administrator has disabled public posting

Re: Use Chameleon to switch YooTheme "profiles"

I'm concidering to buy Chameleon, but i need to know: will chameleon work also on old yootheme template J1.5 to change the style for the particular menus?
I'm talking about the "color" parameter in Chrome theme http://www.yootheme.com/demo/themes/joomla/2008/chrome/

For example set yt_color=space on partucular menu, then yt_color=wood on other menu etc.

dup
Beginner Modder
ranks
useravatar
Offline
15 Posts
Administrator has disabled public posting

Re: Use Chameleon to switch YooTheme "profiles"

I think this probably will work - by all means try it out! You can test this on ChameleonLite for Joomla 1.5 (free).

So in the Succeed action or Fail action you could put this in the PHP box:

JRequest::setVar("yt_color","wood");

Please let us know how you get on with it.

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

Re: Use Chameleon to switch YooTheme "profiles"

When i put this code it switches whole site to the "yt_color","wood"
but what i want is only on particular menu to have "wood" and on the rest of the site i want to have "yt_color","default"

Where can i put this condition? Can't find this option in ChameleonLite

dup
Beginner Modder
ranks
useravatar
Offline
15 Posts
Administrator has disabled public posting

Re: Use Chameleon to switch YooTheme "profiles"

Yes, that's the "Lite" limitation smile

But you can code it almost exactly the same as you would in MetaMod, in the PHP box. (not the PHP box in the Succeed or Fail action, but the other one).

Just return true if you want the rule to succeed, and false to make it fail. It defaults to "fail" unless you specify otherwise.

e.g.

if ($Itemid == 1 or $Itemid == 2 or $Itemid == 3) return true;

Then in the Succeed action, you would put that other PHP code to change the style.
If you upgrade to the non-Lite version, then you get a selector box where you can select all the menu items that you want to apply this to, instead of having to write the PHP expression above.

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

Re: Use Chameleon to switch YooTheme "profiles"

just  bought PRO version and it works, thanks!! Yootheme support was not helpful to point me to any solution, rather then coding myself.

dup
Beginner Modder
ranks
useravatar
Offline
15 Posts
Administrator has disabled public posting

Re: Use Chameleon to switch YooTheme "profiles"

Hey I'm glad that worked so well for you. Thanks for letting us know.

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:
1674
Total Polls:
6
Total Posts:
5917
Total Posts Today:
5
User Info:
 
Total Users:
11538
Newest User:
michael2155
Members Online:
5
Guests Online:
222


Forum Legend:

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