You can use multiple different designs (theme lists) in your installation. You can set up different designs per SiteAccess or SiteAccess group.
Designs are configured under the
ibexa_design_engine.design_list configuration key:
1 2 3 4
To indicate when to use a design, configure it under
1 2 3 4
Each scope can use only one design.
Design theme list¶
A theme is a set of directories to look for templates in. At application level, theme's templates are placed in a directory under
templates/themes which has the same name as the theme.
For example, templates placed in
templates/themes/standard directory are automatically added to the
After you create a new directory with a theme in
you must clear the cache (
php bin/console cache:clear), even if you work in the dev environment.
The order of themes in a design is important.
The design engine attempts to apply the first theme in configuration (for example,
If it cannot find the required template or asset in this theme, it proceeds to the next theme in the list (for example,
theme0 and finally the default
@ibexadesign keyword in template paths is the way to use this feature.
When the design engine finds
@ibexadesign, it loops over the theme list of the current design and checks whether the template for the given theme exists in its paths.
@ibexadesign/pagelayout.html.twig means that this template is searched at locations like
templates/themes/theme0/pagelayout.html.twig and then
You can use this behavior to override only some templates from the main theme of your website. Do this, for example, when you create a SiteAccess with a special design for a campaign.
You can check the final design theme lists with the following command:
Additional theme paths¶
You can add any Twig template directory to the theme configuration.
You can use it if you want to define templates from third-party bundles as part of one of your themes.
To do it, set the
1 2 3 4 5 6
Theme directories that you define have priority over the ones defined in
This ensures that it is always possible to override a template at the application level.
You can also add a global override directory, by listing paths without assigning them to a theme:
1 2 3
You can check the final template directory list per theme with the following command:
_override is a theme added at the beginning of the current design theme list at template path resolution time.
In production environments, to improve performance, asset resolution is done at compilation time. In development environments, assets are resolved at runtime.
You can change this behavior by setting