Hi,

Is it possible to make some changes at the single domain level and others across all domains?

Details as follows.

We are planning to use Domain Access on potentially hundreds of subdomains.

On each subdomain we change the theme logo and basic colors.

There are other theme settings (layout stuff) that we want to configure at a "global" level.

However, we don't want to repeat every layout change hundreds of times.

Any suggestions?

Thanks

Regards

Brett Sh

Comments

BrettSh created an issue. See original summary.

BrettSh’s picture

Title: Possible to Configure Just Some Theme Settings Globally? » Configure Theme Settings at Both Single & Global Domain Levels?
agentrickard’s picture

Before you start making custom settings for each domain, just setting that domain's theme to your base theme will force it to inherit all of the global settings of that theme.

The problem, though, is that once you start editing those theme settings, the defaults will be stored on a per-domain basis.

Ideally, your global configuration could be excluded from the domain-and-theme-specific settings. You might be able to hide those elements using hook_form_alter() in some custom code.

See the logic in domain_theme_form_alter(). You may be able to use hook_form_system_theme_settings_alter() to hide those options across all domains.

The form interaction is defined in domain_theme_settings().

The trick is making sure your alter hook on that form runs after Domain Theme's.

What you are trying to do is make sure that certain global settings are not stored by Domain Theme. See domain_theme_set_variables() for how that works. If a global setting is not overridden by a domain-specific one, then it should work as you need it to.