It would be useful to have a way to create links that will call up a certain theme that is installed on Drupal via Switchtheme. If URLs could be made that indicate which theme to open and actually switch the theme (so that users can continue to browse with the selected theme active) this would be quite useful.

i.e. http://www.example.com/switchtheme=garland

Thanks!

Comments

karens’s picture

Status: Active » Fixed

I think I told you to post this as a feature because I didn't have time to investigate it, but you can do this now. This is not documented anywhere, but just do http://www.example.com/?q=home&theme=bluemarine if you're not using cleanurls or for clean urls you can use http://www.example.com/&theme=bluemarine. You have to use the 'real' name of the them (the name of the folder it is in on your server), not some label you created for it.

Coupon Code Swap’s picture

Hi Karen. I thought posting here was what you meant when you said to post as feature. The http://www.example.com/&theme= does the trick. Exactly what I was hoping was possible. Thanks!

karens’s picture

Yep, I told you to post here because I was thinking it would take some tweaking to do it, but it turns out it doesn't.

Coupon Code Swap’s picture

Isn't it great when things work out that way :)

Coupon Code Swap’s picture

Hi Karen. This isn't working in Drupal 5.0 yet. I get a fatal error on line 36 of switchtheme.

karens’s picture

Now 5.x is fixed, too.

Coupon Code Swap’s picture

Thanks. I'll try it out.

Anonymous’s picture

Status: Fixed » Closed (fixed)