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.

 

Change template using cookie, then change back !?

Change template using cookie, then change back !?

Hello,

I've followed this tutorial here :

http://www.youtube.com/watch?feature=pl … q9rJQGR8#!

And it works great !
Now I would like to setup a kind of template switcher between 2 templates.
So I've declared 2 new rules to reverse the process of the 2 first one, but it does not work for me.

I've declared on the first rule of first assignment into a variable A :
url contains : fullscreen=1
then on second rule, the large template is assigned.

Then I've declared a new rule :
fullscreen=0 , declared into variable B,
then a second rule, the medium template is assigned.

In fact, I guess there's a conflict with the 2 previous rules declared, as the 2 last ruels are not applied.

Could you help please ?

Thanks !

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

Re: Change template using cookie, then change back !?

Ok, seems to work, but ONLY if the default template is different from the 2 I need to switch between.
In fact, it just work once ! I may swith to large, then medium, then, it's over, I can't switch templates anymore...

My problem is I have fist the "medium" template, then I switch with an url to the 2nd (the large one) then, using a url to switch back it does not work for me. sad

Using J! 2.5.9 , Chameleon 2.30b

Thanks !

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

Re: Change template using cookie, then change back !?

Hi,

I have a feeling it's probably based on the order of the rules, and about which session variables are set. When you set session variable A, then set B, then A is still set unless you unset it. So when you set B then you should ALSO unset A. Could that be the problem?

A good way to track this sort of issue down is to use the Options button in Chameleon, and set the Debug mode to ON. Then when you view a page you see the list of steps that Chameleon takes through the rules. This should help you see what's going on.

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

Re: Change template using cookie, then change back !?

Ok works GREAT, I had to force indeed, need to sleep, I'll post the recipe tomorrow I guess smile

Thanks for your help and your very cool components ! (you saved my life on this one )

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

Re: Change template using cookie, then change back !?

Hey I'm very glad it worked for you. Chameleon is capable of some very cool and flexible results, isn't 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
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10091
Newest User:
lamanaudio
Members Online:
3
Guests Online:
125


Forum Legend:

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