Template suggestions for custom block view modes

Created on 17 June 2019, over 5 years ago
Updated 14 August 2024, 3 months ago

Problem/Motivation

Unlike nodes, block entities do not have theme suggestions for view modes on custom block types. This means that if you need to create a template for a block in a specific display mode, then you need to write custom code to pick it up.

Steps to reproduce

NA

Proposed resolution

<!-- FILE NAME SUGGESTIONS:
   * block--content--id--olivero-myfirstblock.html.twig
   * block--content.html.twig
   * block--olivero-myfirstblock.html.twig
   * block--block-content--ec97a186-c1e4-41d7-8527-6bb0e0045e47.html.twig
   * block--block-content--id-view--olivero-myfirstblock--full.html.twig
   * block--block-content--id--olivero-myfirstblock.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--block-content.html.twig
   x block.html.twig

Remaining tasks

Framework manager review
Review

User interface changes

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Feature request
Status

Fixed

Version

10.3

Component
Block content 

Last updated 1 day ago

Created by

🇺🇸United States rlnorthcutt Austin, TX

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024