Render: Entity Field does not work with Custom Block titles

Created on 7 November 2023, about 1 year ago
Updated 2 April 2024, 10 months ago

Problem/Motivation

I wanted to show the title of a custom block using the ECA Render system.

Steps to reproduce

Used Render: Block event to create a block.
Loaded a custom block entity.
Used Render: Entity Field, setting the entity to the loaded block entity, and field to "info" which is the machine name of the block title, found using devel.

The title was not rendered.

Other fields worked fine, but not the label/title. Not sure whether this is also an issue for node titles, taxonomy names, etc.

Proposed resolution

I did find a workaround, which worked better for my needs -- Render: Markup did allow me to drop in an HTML header tag with a class, and show the block title using the normal token system. So perhaps this is more just a documentation issue?

It seems to me the reason you would want to render an entity field is to pick up field formatter settings from a particular view mode, so these might be controlled through the field UI. And this field does not show up on the block "manage display" page, so there's not really any downside I can see to using the token with Render: Markup -- I just found it slightly confusing/unexpected that this didn't work.

Remaining tasks

Either make it work, or add a note in the Render: Entity Field that it may not work on Base fields -- if you don't see it on the Manage Display page, use a token instead...

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Closed: outdated

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

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

Comments & Activities

Production build 0.71.5 2024