The design settings a theme ships
This page is for designers deciding which settings to put in their theme and which to leave to the person who installs it. How designs fall back on each other is explained in The design cascade; here the question is only where each setting lives.
The settings involved
| Setting | File and block | Default in the kernel | Meaning |
|---|---|---|---|
SiteDesign | site.ini [DesignSettings] | admin (the global default; siteaccesses set their own) | The design a siteaccess uses first |
AdditionalSiteDesignList[] | site.ini [DesignSettings] | empty | Further designs searched before the standard one |
StandardDesign | site.ini [DesignSettings] | standard | The last fallback |
DesignExtensions[] | design.ini [ExtensionSettings] | empty | Extensions searched for designs |
FrontendCSSFileList[], FrontendJavaScriptList[] | design.ini [StylesheetSettings], [JavaScriptSettings] | empty | Stylesheets and scripts the public pagelayout loads (Loading stylesheets) |
The recommended split
| In the theme extension | In the installation (siteaccess or override) |
|---|---|
DesignExtensions[]=<extension> | SiteDesign=<design> for the siteaccess that should use the theme |
| The theme's own stylesheet and script lists | AdditionalSiteDesignList[] when the installation combines several themes |
| Defaults of the theme's own settings file | Site name, URLs, mail and database settings |
The reason: a theme can be installed on an installation with several siteaccesses. If the theme set SiteDesign
globally, it would change the administration and every other site too.
When the theme ships a siteaccess
Some themes come with a siteaccess of their own (cjw_themes_jumper has settings for cjw_starter). Then
SiteDesign may live in extension/<theme>/settings/siteaccess/<siteaccess>/site.ini.append.php, because it only
applies while that siteaccess runs (Siteaccess settings inside a theme).
Step by step
Put
DesignExtensions[]and the stylesheet lists in the theme.Document the
SiteDesignline in the README instead of setting it.On a test installation, set it for one siteaccess:
./console exp:ini set site.ini/DesignSettings/SiteDesign mytheme siteaccess:site --dry-run --allow-root-userRead the printed file, then run it again without
--dry-run.Clear the INI cache:
php bin/php/ezcache.php --clear-tag=ini --allow-root-user.Check that the administration still uses its own design.
Related pages
- Designs and siteaccesses
- Registering the design
- Settings files in an extension
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.