Can I force admin theme for node/*/edit (and node/add) only for certain roles?

Comments

tiutiun’s picture

Assigned: Unassigned » tiutiun

Role_theme_switcher module is not path specific, and assigns themes only per role.
Though probably you would like to combine "Use administration theme for content editing" feature in Administration Theme interface.

For ex, you want to:
1. Role A: show by default Theme1, but for editing show Theme2
2. Role B: show only Theme1 in any case, and do not allow to edit or add nodes

For this you:
1. Enable Theme1 as default
2. Enable Theme2 as "Administration theme" and you check Use administration theme for content editing"
3. In Role_theme_switcher enable Theme1 for Role B

Please note, checkbox "Use administration theme for content editing" overwrites behavior of RoleThemeSwitcher

Please let me know if it works for you

danny englander’s picture

Please note, checkbox "Use administration theme for content editing" overwrites behavior of RoleThemeSwitcher

I am using a separate admin theme & I have checked the box "Use administration theme for content editing" but when I have this module enabled that setting is ignored. Is there some other setting somewhere I need to change? When I disable Role Theme Switcher, I get my admin theme back for content editing.

tiutiun’s picture

It looks it depends on the weight of module in the "system" table
If weight = -1, the setting "Use administration theme for content editing" overwrites the RoleThemeSwitcher behavior
If weight = 0, then RoleThemeSwitcher functionality takes precedence.

Since version 6-1.6 RoleThemeSwitcher does not set its weight during installation phase, so by default weight = 0 - thus it takes precedence over "Use administration theme for content editing"

Weight may be updated by module util

Does it bring any light?

danny englander’s picture

Hi, I ended up using the Theme Key module and had somewhat of a similar issue. I ended up adjusting weights with that module and it worked so I would guess the same would be true here. Thanks.

tiutiun’s picture

Status: Active » Closed (cannot reproduce)