Installation¶
Drupal 11.4+
Display Builder targets Drupal 11.4+. No previous version of Drupal support is planned.
It also requires PHP 8.3+ and UI Patterns 2.0.23, exactly.
Try it with the Bootstrap recipe¶
The quickest way to see Display Builder at work is a new site built from the Display Builder with Bootstrap recipe. It installs Display Builder with the UI Suite Bootstrap theme, demo content, page layouts already built, the homepage included, and pattern presets of Bootstrap sections.
It only applies to a new site installed with the Minimal profile. Follow the steps of its project page, then come back to Build your first display.
On a site built with Drupal CMS, see Install on Drupal CMS instead.
Install the module¶
Like any other Drupal module, it is recommended to use composer:
UI Patterns patches¶
Display Builder pins UI Patterns to 2.0.23 and ships two patches for it in its
composer.json, until these issues land in a UI Patterns release:
- #3630451: source labels and prop source lists redo the full lookup on each call
- #3630456:
SourceValueItem::setValue()walks the whole source tree on each load
Both make the builder faster. Display Builder works without them. Updating UI Patterns past 2.0.23 waits for a Display Builder release.
Composer applies them with composer-patches:
- 2.x applies the patches of dependencies by default, but reads them from
patches.lock.jsononce it exists. After requiring or updating Display Builder, runcomposer patches-relockthencomposer patches-repatch. - 1.x applies them only when the root
composer.jsonhas its ownpatchessection, or sets"enable-patching": trueunderextra.
Display Builder is split in sub-modules, one for each Drupal Core's display buildable:
- Entity view and entity view overrides (
display_builder_entity_view) - Page layout (
display_builder_page_layout) - Views (
display_builder_views)
They can be activated from Administration > Extend (/admin/modules) or with Drush:
You can also install Display Builder UI to configure Display Builder:
With the module installed, follow Build your first display to build a display end to end.
Recommended modules¶
Display Builder is automatically activating its dependencies:
- UI Patterns: the engine of Display Builder
- UI Patterns Field: for the entity overrides storage
- UI Patterns Library: provides a nice component library
The sub-modules activate their own dependencies too:
- Entity view (
display_builder_entity_view): Field UI, and UI Patterns Field Formatters to format each field item in entity displays - Views (
display_builder_views): Views, and UI Patterns Views
We are also recommending:
- UI Styles: to use the Styles contextual panel
- UI Skins: to use the Design Tokens contextual panel
- Navigation, from Drupal Core: to use the Display dropdown of the top bar, which lists the displays rendering a front-end page
Without Navigation, content keeps its override tabs, but no link leads from a page to its page layout, entity view display or Views display: open them from the administration pages. The Toolbar module has no equivalent dropdown.
Local libraries¶
Display Builder relies on Shoelace component library, and HTMX sse extension.
By default libraries are loaded with CDN, but you can switch to local copies with drush:
And switch back to CDN mode with drush:
Currently asset.packagist provides a version of Shoelace with Lit dependencies.
Installation with package manager is recommended.
From your installation libraries folder (web/libraries or app/libraries):
Then, back in the libraries folder: