Drupal is a registered trademark of Dries Buytaert

ervms

No security coverage
View on drupal.org

Give content editors the power to choose how each referenced entity displays. This module adds a "View Mode" selector to entity reference fields, allowing different view displays (teaser, card, full, etc.) to be selected per-item without duplicating content.

Features

  • Per-item view mode selection: Choose a different view display for each entity in a multi-value reference field
  • Per-bundle allowed view modes: Restrict which view modes are available to editors on a per-bundle basis — e.g., only offer "Card" and "Full" for one paragraph type while offering "Teaser" and "Default" for another, all on the same field
  • Content editor friendly: Simple dropdown appears below each entity reference selection in the editing form
  • Dynamic options: Available view modes update automatically based on the referenced entity's bundle
  • Works with existing view displays: Uses your already-configured view modes - no extra setup required
  • Paragraph support: Optional submodule (ervms_paragraphs) adds support for paragraph reference fields
  • Nested field support: Works with entity reference fields inside paragraphs
  • CSS classes included: Formatters add view-mode-specific classes for easy theming

Example use case: You have a "Related Content" field that references articles. Some articles should display as teasers, others as cards, and others as full content - all within the same field on the same page, without creating duplicate content or building complex Views.

Post-Installation

Configuration requires two steps:

Step 1: Enable on your field

  1. Go to Structure > Content types > [Your Type] > Manage fields
  2. Edit your entity reference field
  3. Find the "View Mode Selector" fieldset and check "Enable view mode selector"
  4. Save

Step 1b (optional): Restrict allowed view modes per bundle

  1. On the same field settings page, expand the "View Mode Selector" fieldset
  2. When enabled, collapsible groups appear for each target bundle
  3. Check specific view modes to restrict what editors see for that bundle
  4. If none are checked for a bundle, all view modes are shown
  5. "Default" is configurable per bundle and can be excluded

Step 2: Configure the display formatter

  1. Go to Structure > Content types > [Your Type] > Manage display
  2. Change your entity reference field's formatter to "Entity Reference View Mode"
  3. For paragraph fields, use "Paragraph View Mode" formatter instead
  4. Save

The view mode selector will now appear when editing content. Only view displays that are enabled on the target entity type will be available as options, further filtered by any per-bundle restrictions you configured.

Additional Requirements

  • Paragraphs - If you're using paragraph-based content, enable the included ervms_paragraphs submodule for full paragraph support including nested entity references and compatibility with the Paragraphs widget's collapsible interface
  • Entity Reference Field Override - Companion module by Click Here Labs that lets editors override specified fields in referenced entities within the reference context, without changing the referenced entities.

Similar projects

  • Display Suite - Provides extensive display management but at the field level rather than per-reference-item. Does not allow selecting different view modes for individual items within a single field.
  • View Mode Field - Allows selecting a view mode for the current entity being edited, not for referenced entities.
  • Entity View Fallback - Handles fallback logic when view modes don't exist, but doesn't provide editor selection.

This module is unique in providing per-item view mode selection directly in the content editing experience, giving editors granular control over how each referenced entity renders.

Supporting this Module

This module is maintained by Click Here Labs. If you find it useful, consider:

  • Contributing issues and patches
  • Writing documentation or tutorials
  • Sponsoring development of new features

Community Documentation

  • Full documentation available in the module's README.md file
  • API functions for programmatic access to view mode data
  • Troubleshooting guide included for common issues

Activity

Total releases
3
First release
Feb 2026
Latest release
6 days ago
Release cadence
2 days
Stability
67% stable

Release Timeline

Releases

Version Type Release date
1.0.1 Stable Feb 26, 2026
1.0.0 Stable Feb 23, 2026
1.x-dev Dev Feb 23, 2026