By aeropine on
Hello there,
I'd like to use the Garland theme for all activities/pages for authenticated users, and use a custom theme for anonymous users. I've tried choosing Garland as my admin theme but it only seems to apply to items under the Administer menu - (most of my authenticated users will not be administrators - they'll be authors or editors, so they'll be working primarily with content). How would I go about enabling this? Do I need to hook in somewhere and check for the role?
thanks in advance for any help on this!
Comments
maybe...
Role Theme Switcher
thought there was another one...
spot on!
thanks tm, that looks perfect!
not so fast...
Arrgh - I spoke too soon.
I'm not sure whether this is a bug or some kind of configuration problem, but I'm getting the following error when I access my site as anonymous (having set the authenticated theme to Garland, and the anonymous theme to Zen):
Fatal error: Cannot redeclare _phptemplate_variables() (previously declared in /Users/aeropine/drupal/themes/garland/template.php:58) in /Users/aeropine/drupal/sites/all/themes/zen/template.php on line 59
It seems as though the garland theme's declaration needs to "go away"/descope in order for the zen one to work...
Any ideas much appreciated (including any other ways to achieve this theme-per-role challenge)
Thanks!
see...
http://drupal.org/node/72099
especially in template.php, it is just sooo easy to have duplicated function names. wonder if you have to do that function themename_x thing to make a function theme-specific, similar a theme overrides. if you feel this is a bug, you can open an issue at the project's page.
it would be interesting to see how themegarden does it...
sigh
Tm - thanks for your advice - I've posted a bug report but no sign of anyone accepting it.
I find it hard to believe that this approach of all authenticated users needing a separate "admin" theme and all anonymous users needing the "public" theme hasn't been tackled and codified somewhere (many times!) - all "publication" sites (newspapers etc.) must use something like this approach. Unfortunately, simply setting the theme based on the URL isn't enough - it's very jarring to be flipped between admin and non-admin themes as you navigate around to create/edit content...
Arrrgghhh - this is is a real showstopper for me... Anybody else any words of wisdom?
Hello, aeropine. This bug
Hello, aeropine.
This bug fixed in version 5.x-1.1
Role Theme Switcher didn't treat correctly two or more themes, based on phptemplate engine
You can download new version here:
http://drupal.org/node/197996
Please, let me know, if it is all ok now.
Thank you
----
Serj Tiutiun