Great work on the domain modules!
The $custom_theme variable is overridden when posting nodes to organic groups. Therefore, the theme reverts to the default domain's theme.
Updating the domain_theme's weight to 1 in the system table will load the domain_theme module after og. Is there a cleaner way to do this?
Comments
Comment #1
agentrickardNo, there is not. The only question is: Should this be a setting or a default behavior?
Comment #2
agentrickardThere may be a secondary issue. Domain Theme sets the $custom_theme variable in hook_init(), and I assume that OG sets it in hook_menu.
Does changing the weight solve the issue, or do we need to move Domain Theme's routine into hook_menu(!$may_cache)?
Comment #3
v1nce commentedChanging the weight of Domain Theme does solve this issue.
Comment #4
agentrickardOK. I'll put in a small configuration option that provides a UI for changing the module weight, with instructions.
Comment #5
agentrickardComment #6
agentrickardAdded in rc4.
Comment #7
agentrickardI goofed this a little. I allowed the settings to be either negative or positive. Two issues here:
-- If you set the weight to negative, Domain Theme will fire before Domain Access, and the $_domain global will not be set.
-- The issue is that Domain Theme needs to fire later, not earlier, in the page load sequence.
Fix is to change line 121 of domain_theme.module:
Comment #8
scedwar commentedOn a more general point, I'm keen to see functionality to allow sections of sites and groups to be given different themes. Domain achieves this for the multisite level, but the functionality in Organic Groups is currently limited. I've requested a feature to Organic Groups that will allow an admin to set a default theme for a group, and then a group admin to change this:
http://drupal.org/node/202442
It would be good to see any work on domain be compatible with this so that a custom theme (that can be chosen) for a group is not replaced by the Domain Theme.
Similarly, I would be very pleased to see if Domain works with sections (http://drupal.org/project/sections). This would give theme handling options from individual domains right down to individual nodes.
I'll try and test these permutations but it is probably going to be a couple of weeks before I get chance.
Thanks, Stephen
Comment #9
agentrickardThis patch (in rc4) should allow for that, by letting you adjust the order in which the Domain Theme gets fired, relative to the other modules.
There are also plenty of hooks in the Domain module that would let you write a solution.
Comment #10
agentrickardThis was fixed here: http://drupal.org/node/216847
Needed to move the Domain Theme logic from hook_init() to hook_menu().