Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

This module allows you to add custom tabs, like "Content" or "Preview," to any fieldable entity in Drupal. These tabs can display the entity using a specific view mode or form mode, all configured through the admin interface without needing custom code. This provides a focused editing or viewing experience for entities, especially useful for complex content structures.

Content Entity Routes adds extra local-task tabs — like
/node/{node}/content or /media/{media}/preview
to any fieldable content entity. Each tab renders the entity with a configured
view mode (read) or form mode (edit), fully
configurable through the admin UI. No custom code per entity type.

Why

Out of the box, a node has View, Edit and Delete
tabs. Many sites need a focused secondary editing surface — e.g. a
“Content” tab that only exposes paragraph fields, or a
“Preview” tab that renders a media item in a custom view mode.
Building that manually means a custom route, a custom local task, a custom
form-handler registration and a per-bundle opt-in mechanism — for every
entity type.

This module replaces all of that with one config entity:

Entity type Bundles Mode Slug Title Mode name node page, article form content Content content taxonomy_term categories form content Content content media image, icon view custom_preview Live Preview live_preview

Features

  • Works with any entity type that is fieldable and has a canonical link template (node, taxonomy_term, media, user, commerce_product, …).
  • View-mode tabs render the entity in any view mode you have configured.
  • Form-mode tabs reuse the entity’s default form handler but pick up the matching form display automatically — the same trick form_mode_manager uses, with no per-entity-type wiring.
  • Bundle filtering per tab (or leave empty to apply to all bundles).
  • Translation-aware: form-mode tabs on translatable entities also expose /{entity}/translations/edit/{language}/{slug} automatically, so editors can open the configured form mode against a specific non-current translation when navigating from the "Translations" overview.
  • Access delegated to the underlying entity’s view / update permission, so existing entity access, workflows and content moderation keep working.
  • Fully exportable as configuration — tabs live in config/sync like any other config entity.
  • Zero hard-coded entity types or paths.

How it works

  • A config entity (entity_route_tab) stores each tab definition.
  • A route subscriber appends /{slug} to the entity’s canonical path. Form-mode tabs use Drupal’s built-in _entity_form route default; view-mode tabs use a small controller that calls the view builder.
  • hook_entity_type_alter() registers the entity type’s default form handler under the form-mode operation, so ContentEntityForm picks up the matching form display automatically.
  • A local task deriver attaches each tab to the canonical route. Bundle filtering is enforced by a _custom_access check, so tabs are auto-hidden on the wrong bundles via url.access cacheability.

Usage

  1. Create a view mode or form mode you want to expose at Structure → Display modes.
  2. Enable that mode for the target bundle in Manage form display (form mode) or Manage display (view mode) and arrange the fields.
  3. Go to Structure → Entity route tabs and add a new tab. Pick the entity type, bundles, mode type, mode name, slug, title and weight.
  4. The new tab appears on the matching entity pages and is reachable at <canonical-path>/<slug>, e.g. /node/42/content.

Permissions

  • Administer entity route tabs — manage the config entities.
  • Per-tab access is delegated to the entity’s view (view-mode tab) or update (form-mode tab) check, so no extra permissions to wire up.

Requirements

  • Drupal 10.3+ or Drupal 11
  • PHP 8.1+
  • An existing view mode or form mode on the target entity type

Installation

composer require drupal/content_entity_routes
drush en content_entity_routes

Roadmap

  • Add-translation in form mode — equivalent of /{entity}/translations/add/{source}/{target}/{slug}, so a brand-new translation can be created directly in a custom form mode (today only the edit-translation variant is wired up).
  • Local task derivation on the translations overview page, so the form-mode tabs appear there too instead of requiring direct URL access.

Similar modules

  • Form mode manager — exposes extra form modes as routes. Content Entity Routes covers both form and view modes, with explicit per-tab config entities (label, slug, bundle filter, weight) instead of an automatic per-form-mode route. It also ships an edit-translation route variant that form_mode_manager doesn’t.
  • View mode page — nodes only. Content Entity Routes works for any fieldable entity type and exposes both view and form modes.

Activity

Tracked releases
1
Tracked since
May 2026
Latest release
3 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
0.x-dev Dev May 20, 2026