Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

View Mode By Role (VMBR)

10 sites No security coverage
View on drupal.org

This module allows site administrators to assign different display modes for content and users based on their assigned roles. It enables the customization of how content and user profiles are viewed, with options to prioritize roles when a user has multiple.

The View Mode By Role (VMBR) module allows site administrators to assign
custom view modes for both users and content (nodes) based on user roles.

With this module, you can:

  • Define a default user view mode for each role.
  • Define a default content (node) view mode for each role.
  • Assign weights to roles so that, when a user has multiple roles, the role with the highest priority determines the view mode.
  • Fall back to the standard full view mode when no custom setting is defined.

Key Features

  • Adds configuration fields on each role edit form to select:
    • User View Mode
    • Content View Mode
    • Role Priority Weight
  • Automatically alters entity rendering to apply the configured view mode for logged-in users.
  • Supports Drupal 8, 9, 10, and 11.

Example Use Cases

  • Show different profile layouts for editors vs. subscribers.
  • Display different node layouts (teasers, compact, or custom view modes) depending on whether a visitor is anonymous, a customer, or an administrator.
  • Prioritize roles (e.g., if a user is both “Customer” and “VIP,” ensure the VIP view mode takes precedence).

Requirements

  • None — works with core entity and role system.

Compatibility

  • Works with all entity view modes registered for user and node entities.
  • Fully compatible with Drupal’s role system and multi-role assignments.

Activity

Total releases
2
First release
Aug 2025
Latest release
10 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Aug 23, 2025
1.0.x-dev Dev Aug 23, 2025