Variable module (https://www.drupal.org/project/variable) provides an API for declaring all system variables, and a unified UI. The project has a submodule, Variable Realm, which allows variables to be varied according to different realms, such as language, domain, and so on. Domain Variable (https://www.drupal.org/project/domain_variable) defined the domain realm, which allows site variables to have different values on different realms.

Adding an implementation of hook_variable_info(), along with Variable Realm and Domain Variable properties in the data returned, would allow pathauto patterns to be varied per-domain.

Looking at the definition of the hook, it looks like it might be possible to use its 'Multiple variables' system rather than declaring every single pathauto pattern variable.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

joachim’s picture

Status: Active » Needs review
FileSize
2.41 KB

Turns out the multiple variable system isn't really necessary, as Pathauto has its own system for modules to define pattern variables. So we just piggyback onto that to declare them to hook_variable_info().