Hi All,

I am VERY new to Drupal and I'm having some theming difficulties. I'm sorry if this is a redundant post, but after doing some searching, I couldn't find exactly what I need. Currently, I have two themes on my site: Zen and Garland. I have adapted Zen for Anonymous Users and Garland is my admin theme. Is there a way to use garland (and only garland) for Authenticated and Administrative Users and then Zen for Anonymous Users?

I know this is probably a very basic question, so thanks in advance for your patience.

hn

Comments

Anonymous’s picture

I don't know if this is exactly what you want, but I thought that I would mention it. You can set separate themes for your normal site and administration pages. In Drupal 5.2 it is at Admin->Site Configuration->Administration Theme.

sysipheantaskmaster’s picture

Thanks for the feedback. I managed to setup an administrative theme, but my problem is, I'd like to keep that theme throughout the site the entire site when I'm logged in. The site I'm working on is a portal, so all visitors will be "Anonymous Users." I would like them to only see the Zen theme (as they are not logged in). There is also a team of students who update the site on a daily basis, they really have no need for seeing the site as is, rather they need to update the content and I'd prefer to use the Garland theme for them.

I basically want a "back-end" Dashboard and "front-end" a la Wordpress. I don't know if this made my inquiry any clearer, but thanks in advance.

Anonymous’s picture

I think that there may be another way to accomplish this. You can enable both the normal theme and the admin theme in Administer->Site Building->Themes. You can then make the normal theme the "default" theme. You can then give your administrators the permission to change their theme in Administer->User Management->Access Control then under the "system module" option. Then the administrators can change their theme to either the normal theme or the admin theme as they wish. Does that achieve what you want?

sysipheantaskmaster’s picture

I really appreciate your help, someday I'll get this right?

So when I click on Content -> Create Content from the Admin page, the theme switches from the Admin theme to the default theme, I'd like to keep it in the Admin theme.

The trouble with granting Authenticated Users the ability to switch their theme, is that it changes the themes for parts of the site (nodes) that I want the anonymous users to access. They should only see the Zen theme, whereas the Authenticated Users and Admins should only see the Garland theme unless they logout.

I thought I read somewhere that it could be solved using taxonomy?

vm’s picture

So when I click on Content -> Create Content from the Admin page, the theme switches from the Admin theme to the default theme, I'd like to keep it in the Admin theme.

because you have left the admin area. go to your admins profile and switch the theme to garland.
set the sites default theme to zen
have authenticated users (though I'd use a another role for this) set their profile to garland in their profile

this should accomplish what you want.

anon users will see zen because it is site default theme in administer -> themes
admin will see garland because admin chose garland in profile
authenticated (or other role) will see garland because that is what they chose in their profile.

I thought I read somewhere that it could be solved using taxonomy?

nope, taxonomy_theme.module themes each category of a site. this wouldn't have anything to do with user roles.

sysipheantaskmaster’s picture

AHA! Thank you both for all of your help, I have exactly what I want.

Good night from New York,

hn

Anonymous’s picture

I'm glad that we could help. Good luck with your site.

Anonymous’s picture

"have authenticated users (though I'd use a another role for this) set their profile to garland in their profile"

Is there a way to set another theme for authenticated users by default? My goal is for the site to look different for users who are logged in. What's an easy way to do that?

Happy day,
Anne

avillager’s picture

Anybody found a way?

brendanrjohn’s picture

You've hopefully not held your breath for this answer, but for anyone else facing the same problem, try using the ThemeKey module. You can create a theme switching rule based on user roles, which I think would solve the problem.

jaypan’s picture

You can also implement hook_custom_theme(), allowing for more complex methods of determining which theme should be used.

Contact me to contract me for D7 -> D10/11 migrations.