By tintin85 on
What I want to do is...
If you're an anonymous (role) user, the website uses garland theme.
If you're an athenticated user, the website uses garland theme.
If you're an admin user, the website uses chameleon theme.
I have 3 roles:
anonymous (default - locked)
authenticated (default - locked)
admin (I created this)
Thank you in advance.
Comments
Actually, each user can
Actually, each user can select its own theme by itself.
You can set a default administrative theme for user #1 as well.
Some other ideas: http://drupal.org/node/79782
same issue!
is it possible to assign different themes for differen roles?
users r not given the option to select their themes but, depending on the user role the theme shld b changing!
-- Sree --
IRC Nick: sreeveturi
CSS + PHP way to change theme based on role
I did mine this way:
Making it load different CSS file (which means different theme) based on user role.
Then for further theming, the HTML and PHP part, i used the same technique:
All that in one file, which usually is page.tpl.php
The end file looks like this:
For PHPTemplate engine. Assuming you know CSS and HTML though, and if you are designing your own theme. This way also i get to package the theme (including its alternate role-based themes in one package of theme). I feel there is a better way somehow, just don't seem to find it around here in the forum. Can someone link me if they know?
Thanks in advance :)
module to do this now
Shortly after this forum topic was posted a module was created which does exactly this.
See http://drupal.org/project/role_theme_switcher
--
Open Prediction Markets | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book
--
Morris Animal Foundation