By robpowell on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
Block content now has type and view mode specific Twig suggestions identical to other content entities like Node.
Before this change, to make the block content behave like other content entities developers would have to alter the block suggestions in their custom theme. This is no longer needed
Before
A block type of "foo" and a title of "foo bar" had the following theme suggestions.
<!-- FILE NAME SUGGESTIONS:
▪️ block--foobar.html.twig
▪️ block--block-content--3ccfaaf5-6a86-42de-b716-d352a2d27f9e.html.twig
▪️ block--block-content.html.twig
▪️ block--bundle--basic.html.twig
▪️ block--block-content.html.twig
✅ block.html.twig
-->
After
A block type of "foo" and a title of "foo bar" had the following theme suggestions.
<!-- FILE NAME SUGGESTIONS:
▪️ block--foobar.html.twig
▪️ block--block-content--3ccfaaf5-6a86-42de-b716-d352a2d27f9e.html.twig
▪️ block--block-content--id-view--foobar--full.html.twig
▪️ block--block-content--id--foobar.html.twig
▪️ block--block-content--view-type--basic--full.html.twig
▪️ block--block-content--type--basic.html.twig
▪️ block--block-content--view--full.html.twig
▪️ block--bundle--basic.html.twig
▪️ block--block-content.html.twig
✅ block.html.twig
-->
Impacts:
Module developers
Themers