Default theme selector
: shell
: default-theme-selector
: theme-selector
: /modules/core/ui/services/default-theme-selector.js
DefaultThemeSelector
Kind: global class
new DefaultThemeSelector(scope)
The default theme selector picks the theme that is configured in site settings.
An example of site settings that picks the default theme is:
"default-theme-selector": { "theme": "decent-theme-default" }
The name specified in the settings must be the technical name of the theme as
specified in the theme's manifest (package.json file at the root of the theme.
| Param | Type | Description |
|---|---|---|
| scope | object |
The scope. |
defaultThemeSelector.isThemeActive(moduleManifest) ⇒ boolean
Looks at a theme's manifest and determines whether it should be active for the current request, by comparing its name with the one configured in site settings.
Kind: instance method of DefaultThemeSelector
Returns: boolean - True if the theme should be active.
| Param | Type | Description |
|---|---|---|
| moduleManifest | object |
The module's manifest. |