The domain variable module can already be used to have domain-specific theme settings. In order to fully replace the domain_theme module, we would have to also handle settings from the core color module:

  • color_[theme]_palette
  • color_[theme]_stylesheets
  • color_[theme]_logo
  • color_[theme]_files
  • color_[theme]_screenshot

These cannot unfortunately not be handled the same way as other realm variables, because we need color_scheme_form_submit() to create colorized stylesheets and image files... which means we cannot circumvent it.

Comments

bforchhammer’s picture

Status: Active » Postponed

The solution employed by the Domain Theme module is to hook into the form building and submission process...

Form building (see domain_theme_form_alter()):

  1. Store existing color module values in $form[domain_color_defaults]
  2. Add custom submit handlers domain_theme_color_submit() and domain_theme_settings_submit() in order below.

Form submission:

  1. domain_theme_color_submit(): If the theme is saved as 'default', we have to be sure not to delete existing color directories.
  2. color_scheme_form_submit(): Saves color palette, creates colorized stylesheets and images.
  3. domain_theme_settings_submit():
    • Make sure default variables contain correct values (i.e. save 'domain_color_defaults' back to variable table)
    • Save domain specific color values in domain_theme table.

Should not be too difficult to replicate for domain variable; could possibly also go directly into variable module (or new "color variables" module?).

Postponed for now. Patches are welcome :-)

attisan’s picture

Issue summary: View changes

any progress / plans on this?