Drupal is a registered trademark of Dries Buytaert
drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.14 Minor update available for module linkit (7.0.14). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.2 Minor update available for module eca (3.1.2). content_access 2.1.0 Minor update available for module content_access (2.1.0). editoria11y 3.0.2 Minor update available for module editoria11y (3.0.2). rebuild_cache_access 8.x-1.14 Minor update available for module rebuild_cache_access (8.x-1.14). webform 6.3.0-beta9 New beta version released for module webform (6.3.0-beta9). tagify 1.2.51 Minor update available for module tagify (1.2.51).

This module provides a View mode switch field type that allows content editors to change specific view modes when editing an entity (see attached GIFs for short demonstrations).

Common use cases

  • You have an entity like a Paragraph (or any other fieldable entity type) which may be displayed in different variants (e.g. an "Image + text" paragraph that may be outputted with the image on the left, right or even above the text). With this field added to the entity and all appropriate view modes configured, content editors will be able to decide which view mode to use when displaying the entity.
  • You have entity listings where you want to be able to highlight specific items by using a different view mode for them.

Features

  • Both the origin view mode(s) and the view mode(s) allowed to switch to are configurable per field. You may even change these settings later, when there are already values available for a field.
  • A single View mode switch field may be used to apply the same view mode for one or more view modes (e.g. control the view mode to use for "Full" and "Preview" view mode simultaneously). If different origin view modes should be switched differently, just add any number of View mode switch fields to handle those separately.
  • View mode switches may be chained! Before outputting a view mode, it is always checked, if there is another field requesting a switch for that view mode (with recursion detection).
  • The site's status report informs about any misconfigured View mode switch fields (e.g. when all origin view modes were removed, that have been associated to a field).
  • Even though view mode switching happens "behind the scenes" with hook_entity_view_mode_alter(), it is also possible to output the field value via Field UI (e.g. for administrative previews) - either the view mode's machine name or its human-readable label.
  • Supports displaying field value differences between revisions via Diff module.
  • All code is thoroughly tested and automated tests are available for all functionality.

Similar modules

  • View Mode Selector (similar approach, but it only allows to switch a special view_mode_selector view mode)

Activity

Total releases
1
First release
May 2026
Latest release
22 hours ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
3.x-dev Dev May 5, 2026