Allow fields other than title to be used as the entity label

Created on 17 August 2016, over 8 years ago
Updated 23 January 2024, 10 months ago

Currently it appears only the title can be used as the entity label. The label method was introduced here: #2558143: Opt-out from optional base fields

Many custom entities don't need a title field but may have other suitable fields which can be used as the label. If there's already a way to do this in the UI then I've missed it completely. The Title property/field seems to be left over from the pre-entity node days and is entirely optional with entities. Entity Labels aren't (or shouldn't be) optional and are more flexible.

Somewhat related, but it could also be good for the ECK content list ( /admin/structure/eck/entity/entity_type ) to have a Label column instead of Title by default.

Could this be done on a per-bundle basis? For example, we could list all the fields of type "string" as potential candidates, as well as the title if it's enabled.

Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

🇦🇺Australia imclean Tasmania

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

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