Make the view mode that is used configurable

Created on 14 October 2020, over 4 years ago
Updated 27 April 2025, 25 days ago

Problem/Motivation

The view mode that is used to render a node is hard-coded to use the "full" view mode. In the comment it states that this can be altered using hooks, but the hook_entity_view_mode_alter() does not provide sufficient context. Wouldn't it be a lot more convenient if you could configure the view mode that is used?

Proposed resolution

Add a configuration option "view mode" to the admin form and use that to render the node.

Remaining tasks

None. A patch is ready and will be attached to the issue.

User interface changes

An added configuration option "view mode" to the admin form.

API changes

None.

Data model changes

An added configuration option "view mode" to the module configuration. The patch will also contain an update hook to set the configuration to "full" for existing installations.

✨ Feature request
Status

RTBC

Version

2.2

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Marty2081

Live updates comments and jobs are added and updated live.
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