As a site builder one of the common questions is how to have Drupal use the main theme, or user-theme when a user is adding or editing content.
One very neat way to achieve this is to use the Context module.
Create a new context, then add conditions. For example, for users editing a certain content type, do the following:
Condition 1: node bundle - here you set the content type
Condition 2: User role - specify for which user roles you want to set the theme... WAIT! there's "negate condition", how cool is that. Check "Administrator" and "negate condition", so all users except admins will have the main theme displayed
Condition 3: for now, anyone except admins viewing the node in any mode will have the main theme displayed, which might be fine. if you really want to restrict it to add and edit actions, you can for example choose "request path" and then input */add/* and */edit/* on separate lines, these will match the URLs Drupal uses for adding and editing content.
And then you need to tell Drupal what to do when above conditions are met
Add a reaction: "theme". check the theme to be displayed.
Last, don't forget to check "require all conditions".
Done!
This Context module is extremely powerful, I guess I will play around with it a bit.
- Log in to post comments
Comments