Problem/Motivation
Add a new ConfigActionPluginInterface plugin, setPropertyByTheme, that sets one or more config property paths to different values depending on the site's default theme (system.theme:default), falling back to a _default value when no theme-specific entry matches.
Motivation: recipes sometimes need theme-conditional config (e.g. CSS classes on a view display field) without duplicating whole setProperties blocks per theme, and without baking theme-specific values into the recipe's primary config action.
Proposed usage:
config:
actions:
views.view.commerce_cart_form:
setPropertyByTheme:
display.default.display_options.fields.variation_alternative.list_classes:
belgrade: 'belgrade-list'
_default: ''
This way we can ship with generic recipes that will alter the output depending on the specific theme in use, satisfying multiple marketplace templates at once.
Scope:
- Plugin only, no new services/config schema beyond plugin discovery
- Resolves once at apply time (matches existing config action semantics - not reactive to later theme switches)
Issue fork commerce_config_actions-3609518
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #6
zaporylie