I wanted a way to quickly switch (view / compare) different themes on a website.
Therefore I patched theme.inc to recognise a 'theme=' query argument in the URL. (Yes, it's a query also when you have Clean URLs support on; I personally don't mind this.)
I also patched common.inc:url() so that the '?theme=...' part of an URL propagates to other pages too, and you can browse some other parts of the site in the specified theme. (Note that this only works for URLs passed through url(), and that is not all URLs - for instance, not the ones in the top menu or hardcoded in node content. If you REALLY want to browse the site in one theme, you are still supposed to switch themes in your user profile.)
I don't know if you find this (esp. the second thing) useful enough for the real Drupal core; you decide :)
| Comment | File | Size | Author |
|---|---|---|---|
| themesinurl.patch | 1.24 KB | roderik |
Comments
Comment #1
roderik(set minor)
Comment #2
killes@www.drop.org commentedNo new features will be added to 4.4. Please submit a new patch or close.
Comment #3
Uwe Hermann commentedComment #4
bdragon commentedComment #5
webchickI would prefer such functionality to live in contrib, not core. I'm sure sites like Sony and MTV would get a bit miffed if users were browsing their site with ?theme=Garland. ;) Additionally, some themes have logic embedded into their template.php files, so this could break sites.
Look at http://drupal.org/project/switchtheme if you're interested in doing something like this.
Comment #6
roderikAgreed.
I'm surprised that a 5 year old patch for 4.4 which wasn't a clean solution, has survived for nearly 5 years :-p
(And yeah, I'll start tracking my own issues better, now that I actually know my Drupal stuff.)