Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Domain_theme module uses hook_custom_theme to change the default theme for certain domains.
When i visit that domain as an anonymous user, $sweaver->get_theme_key() returns the theme defined in hook_custom_theme.
If i try to change the theme as user one using sweaver, $sweaver->get_theme_key() returns the default theme provided.
This means i cannot use sweaver to style pages that have their theme changed using hook_custom_theme.
Is it posible to reset the sweaver instance on hook_custom_theme?
Comment | File | Size | Author |
---|---|---|---|
#3 | sweaver-7.x-1.x-dev_use-menu-get-custom-theme-1346028.patch | 537 bytes | Rory |
Comments
Comment #1
svdhout CreditAttribution: svdhout commentedI figured it out.
The sweaver object constructor uses variable_get('theme_default', 'garland') to set_current_theme.
If a custom theme exists this should be used instead of the theme_default variable
should be
Comment #2
jyve CreditAttribution: jyve commentedComment #3
Rory CreditAttribution: Rory commentedPatch attached.