Problem/Motivation
We are mostly testing Entity view display with theme overriding and cleaning entity templates (node.html.twig, user.html.twig, media.html.twig...)
However, when we test with Olivero, we notice this:
- content._display_builder is not properly printed
- we still have the placeholders for
author_name and others hardcoded print like that
Proposed resolution
Like what we have done for Views and Page Layout, add a specific (and dynamic!) theme registry entry for display edited by Display Builder.
With a minimalist entity.html.twig:
{{ content }}
it will also be the opportunity to tidy and simplify EntityViewDisplayTrait::displayBuilderBuildMultiple()
Comments
Comment #2
pdureau commentedLet's try a fresh new install, so with olivero as the only front theme.
Article full page
Setup:
teasercomponent: /admin/structure/types/manage/article/display/default/display-builderWe pass through Olivero's
node.html.twigResults:
node.html.twignode.html.twig. We can't consider this something to fix or something to keep.Article teaser
We pass through Olivero's
node--teaser.html.twigwhich a presenter template callingolivero:teasercomponentBefore activating display builder in /admin/structure/types/manage/article/display/teaser :
EntityViewDisplayTrait::displayBuilderBuildMultiple()After building /admin/structure/types/manage/article/display/teaser/display-builder
conclusion
So, they are 2 things to fix in this issue:
Comment #4
pdureau commentedMR opened. Work in progress
Comment #5
pdureau commentedIt will also be the opportunity to make Display Builder priority upon Layoutt Builder when both are activated, and maybe merge the 2 implementation of
::buildMultiple()Comment #6
pdureau commentedLet's try a fresh new install, so with olivero as the only front theme.
Article full page
Setup:
teasercomponent: /admin/structure/types/manage/article/display/default/display-builder✅ We don't pass through Olivero's
node.html.twiganymoreResults:
node.html.twigfinally. We have the same issue with any theme, with or wthout display builder. It may be related to my environement.node.html.twig.Article teaser
Before activating display builder in /admin/structure/types/manage/article/display/teaser , we pass through Olivero's
node--teaser.html.twigwhich a presenter template callingolivero:teasercomponent:After building /admin/structure/types/manage/article/display/teaser/display-builder
conclusion
So, they are 2 things to fix in this issue:
And also:
Comment #7
pdureau commentedComment #9
mogtofu33 commentedComment #10
pdureau commented