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.
Re: Use Chameleon to switch YooTheme "profiles"
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.
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
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
Re: Use Chameleon to switch YooTheme "profiles"
Yes, that's the "Lite" limitation
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
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 2
- User Info:
- Total Users:
- 8028
- Newest User:
- musial8334
- 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