Page 1 of 1

Problems withtemplate switching... Again.

Posted: Sun Dec 10, 2006 12:51 am
by Martin
I know this has come up before, but I've tried all the fixes I read about here, plus a couple other.

The long and short of it is this: I use a custom dropdown box as described by Garvin here, but I have also tested with the default plugin and the experience is the same.

I select a new template, and nothing happens. I've checked my rewrite rules and I've given each of the relevant stylesheets a different name and hard coded them into the index.tpl files. Still I'm unable to switch the templates.

If anyone can help solve this I'll be most grateful.

-m

*EDIT: Fixed. I need to stop asking questions at the end of 12 hours of coding*

Posted: Sun Dec 10, 2006 5:10 am
by judebert
Glad you got it fixed. Care to share the solution? Caching problem?

Posted: Sun Dec 10, 2006 9:57 am
by Timbalu
Hi,

well, I discovered the same issue, so I switched back to the templatechooser sidebar plugin and changed info.txt to xinfo.txt in each of my unwanted templates.
This definitely works!

Ian

Posted: Sun Dec 10, 2006 2:41 pm
by Martin
Nah...
It was just me not realizing that removing the sidebar plugin also removed the event plugin. :roll:

But while we're on the topic; Anyone know how one would go about to set a cookie to remember a users preferred theme? I don't know if the regular plugin does this, but my homebrew one doesn't seem to remember very well.

Posted: Sun Dec 10, 2006 3:37 pm
by Timbalu
the sidebar plugin does remember!

Ian

Posted: Sun Dec 10, 2006 3:49 pm
by Martin
Yeah... But I don't wanna use the sidebar plugin unless I have to.

Posted: Mon Dec 11, 2006 4:22 pm
by judebert
If you have access to the Serendipity functions, you can use serendipity_setCookie(name, data) -- that's what the templatechooser plugin does. You can retrieve the cookie from $serendipity['COOKIE']['name'] when you need it back.