Skip to content

Alter entity view mode

Available since: 2.0.0

Provided tokens

Token Description
[event] The event.
[event:view_mode] The view mode machine name.
[event] The event.
[event:machine_name] The machine name of the ECA event.
[session_user] The user account that dispatched the event, regardless if ECA is processing models under a different account. This is only available if ECA is configured to always run under a specific account.
[entity] The entity of the event.
[ENTITY_TYPE] The entity of the event under the name of its entity type.

Fires before an entity is rendered, allowing the view mode to be changed dynamically. Useful for switching between view modes based on user roles, entity field values, or other runtime conditions.

Fields

Type (and bundle)

This field provides a list with all created content entities and its bundles. You als can also select -any-, if you want to react to all types or bundles.