Use the EntityDisplayRepository to get the view mode options

Created on 12 August 2024, 3 months ago
Updated 13 September 2024, 2 months ago

Problem/Motivation

Not a big issue, but there's currently no way to use the "Default" view mode to render an entity when using the LeafletMap view style. The closest it gives you is the full content display which holds special meaning, as that's ideally used for when the entity is viewed on the frontend and can lead to effects such as this where certain special fields may be rendered when they shouldn't.

Steps to reproduce

Under a leaflet map view. Set the leaflet popup source to Entity, and switch the Popup Source to "< node entity >". "Default" should be available as a view mode option, but isn't currently available.

Proposed resolution

Use the entity display repository to get the view mode options so that it works just like core currently does, without needing to manually build the options.

Remaining tasks

Provide issue fork / merge request.

User interface changes

The "Default" option will now be available to select.

API changes

Data model changes

📌 Task
Status

Fixed

Version

10.2

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024