Closed (fixed)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Engine
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Mar 2009 at 21:44 UTC
Updated:
10 Jun 2011 at 21:18 UTC
If this module could implement the raw theme change into an action, then the desired effect would be much more extensible using modules like Rules or Trigger. Rules already has an awesome UI, so this would fit very nicely.
Comments
Comment #1
sunI'd rather like to see this in http://drupal.org/project/switchtheme
Comment #2
mitchell commented@sun: Either way, we don't need another UI module or a block; all we need is an action to switch the theme.
Comment #3
mitchell commentedMoving to Rules.
Here are some of the modules that provide this functionality and a single-use UI:
Comment #4
hosais commentedHi,
I would like to change the theme after the user login in.
I installed the lastest version of ThemeKey(6.x-1.2-beta1) and Rules(6.x-1.1).
By Rules, I can trigger user login but I cannot find the action to switch Theme. Do I need to add PHP code (for the action) myself?
Thank you.
hosais
Comment #5
mkalkbrenner@hosais: You can easily implement that feature using ThemeKey. Just create a Theme Switching Rule like this:
Property: user:uid
Operator: >
Value: 0
Comment #6
fagohm, I'm not sure it's a good idea to implement this directly as action, as this would only work when executed soon enough - but for most events it would be already too late. Perhaps best we can implement this feature by allowing actions to work only on a whitelist of events. Other opinions?
Comment #7
mkalkbrenner@#6,fago:
That's why ThemeKey uses hook_init().
Please have a look at #647716: Integrate with Rules.
It seems to me that it's not a good idea to integrate both modules.
Comment #8
kevinquillen commentedIs there a way to load a particular CSS file in a theme? I have 1 theme with 7 CSS files depending on what path you are in. I don't want to load up a whole new theme, as it is just CSS additions to the base stylesheet.
Comment #9
amitaibu@stripped your speech,
You can conditionally load the css in hook_init() based on the path (use menu_get_item() to get the path).
Comment #10
kevinquillen commentedIn this module? Or my own?
Comment #11
amitaibu@stripped your speech ,
Your own custom module
Comment #12
mitchell commentedSee: Theme Rules.
Comment #14
entrigan commentedI think it is now possible to whitelist actions to specific events (fago's concern in #6). Setting back to active and updating version.