The standard design and your theme
This page is for developers and theme builders who give a DXP site its own look. The skeleton has "no demo design" (DXP skeleton), so every site starts from the standard design and adds a theme.
Contents
- What ibexa/standard-design provides
- Where the standard theme's templates come from
- Building your theme
- Theme assets
- A theme checklist
What ibexa/standard-design provides
In an installed project the package holds configuration only:
- it defines the design
standardwith the single themestandard; - it points the default templates to
@ibexadesign, so any theme can replace them:
| Default | Template |
|---|---|
| Page layout | @ibexadesign/pagelayout.html.twig |
| Base layout of content views | @ibexadesign/viewbase_layout.html.twig |
| Full, line, embed, embed image and linked text views | @ibexadesign/default/content/<view>.html.twig |
| Field rendering | @ibexadesign/content_fields.html.twig |
| Field definition settings | @ibexadesign/fielddefinition_settings.html.twig |
Where the standard theme's templates come from
Bundles ship templates for the standard theme in their Resources/views/themes/standard/ directories (the rich
text, matrix, search, messenger, notifications and Twig components packages among them). The design engine collects
every bundle's themes/ directories and your project's templates/themes/ into one map per theme.
Building your theme
Create the theme directory:
templates/themes/my_theme/.Define a design that puts your theme before
standard:ibexa_design_engine: design_list: my_design: [my_theme, standard]Give the site siteaccesses that design (
ibexa.system.site_group.design: my_design).Write
templates/themes/my_theme/pagelayout.html.twigwith your HTML skeleton and a block for the content.Add view templates for your content types (for example
full/article.html.twig) and map them to the content type in the content view configuration of your siteaccess group (thecontent_viewsettings of the core).Clear the cache and open a page.
Anything your theme does not define falls back to standard.
Theme assets
The design engine also resolves assets per theme: it looks in public/assets/themes/<theme>/ at application level
and in bundles' public themes/ directories. Most projects build their stylesheets and scripts with Webpack Encore
instead and include them with the Encore Twig functions (Building assets).
A theme checklist
- Templates refer to
@ibexadesign/..., never to a theme path. - The page layout has landmarks, a skip link, a language attribute and a visible focus style (Accessibility basics for themes).
- Images use variations, not originals (Image variations).
- No inline scripts or styles, so a Content Security Policy can stay strict (CSP-safe design).
- Light and dark color schemes are tested if the site offers both.
Related pages
- Twig templates and the design engine
- Twig functions you use daily
- Designers: start here
- 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.