Manage Display
manage_display
Makes base fields such as 'title', 'uid', and 'created' available in Drupal's 'Manage Display' interface, allowing site builders to configure how these fields appear on entity pages.
Overview
The Manage Display module extends Drupal core's display management capabilities by making previously hidden base fields accessible through the standard 'Manage Display' administration interface. This allows site builders to control the visibility, formatting, and positioning of fields like title, author (uid), and creation date without writing custom code.
The module uses Drupal core's existing framework rather than inventing new mechanisms, with the ultimate goal of having this functionality absorbed into Drupal core. It supports multiple entity types including nodes, taxonomy terms, users, comments, and aggregator feeds/items.
Three custom field formatters are provided: a Title formatter for label fields with configurable HTML tags, a Submitted formatter that displays author and date information in the classic 'Submitted by X on Y' format, and an In Reply To formatter specifically for comment threading.
Install
composer require 'drupal/manage_display:^3.0'
Features
- Makes base fields (title, uid, created, name, etc.) available in the 'Manage Display' interface for nodes, taxonomy terms, users, comments, and aggregator content
- Title formatter allows wrapping titles in configurable HTML tags (H1-H5, span, div) with optional linking to the entity
- Submitted formatter displays 'Submitted by [author] on [date]' with optional user picture, configurable view mode for user picture display
- In Reply To formatter for comment parent references, showing 'In reply to [subject] by [author]' to help screen readers follow discussion threads
- Automatically hides the legacy 'Display submitted' checkbox on content type forms since this is now controlled via Manage Display
- Reuses Drupal core's inline field templates for consistent styling with existing themes
- Comment-specific submitted template includes permalink and parent comment reference for accessibility
Use Cases
Customizing node title display
On a blog site, you want article titles displayed as H2 headings with links to the full article on listing pages, but as H1 headings without links on the full article page. Enable the module, go to Structure > Content types > Article > Manage display, drag the Title field into the visible area, select the 'Title' formatter, and configure the tag (H2) and link settings for the 'Teaser' view mode. Repeat for the 'Default' view mode with H1 and no link.
Displaying author information with user pictures
You want to show 'Submitted by [author] on [date]' with the author's profile picture on blog posts. Go to Manage display for your content type, enable the 'uid' field with the 'Submitted' formatter. In the formatter settings, select a view mode for the user picture (e.g., 'Compact'). Enable the 'created' field to include the date in the submitted line.
Hiding submission info on landing pages
On a landing page content type, you don't want to show any author or date information. Go to Structure > Content types > Landing page > Manage display and drag the Title, uid, and created fields to the 'Disabled' region. The module gives you this control without custom code.
Improving comment thread accessibility
For accessible comment threads, enable the 'pid' (parent ID) field with the 'In reply to' formatter on your comment type's Manage display. This adds 'In reply to [subject] by [author]' information (visually hidden by default) that helps screen reader users navigate threaded discussions.
Taxonomy term title formatting
You want taxonomy term pages to display the term name as an H1 heading. After enabling the module, go to Structure > Taxonomy > [vocabulary] > Manage display and configure the 'name' field with the Title formatter, setting the tag to H1.
Tips
- When using the Submitted formatter, remember to also enable the 'created' field if you want the date to appear. The module will show 'Submitted by [author]' without the date if 'created' is disabled.
- The Title formatter inherits settings from core's String formatter, so you can also control whether the title links to the entity.
- Use different view modes (Default, Teaser, Full) to configure how base fields appear in different contexts.
- The 'In reply to' formatter is only available for the comment 'pid' field - it won't appear for other entity references.
- After installation, the module automatically hides the legacy 'Display submitted' checkbox on content type forms since this is now controlled via Manage Display.
- The submitted template uses 'visually-hidden' class for parent comment info, making it accessible to screen readers without cluttering the visual display.
- Test your display configuration in different themes, as the submitted templates are designed to work with Drupal's default template structure.
Related Projects
Makes node base fields (title, uid, created) available in Manage Display with appropriate default formatters.
Makes comment base fields (subject, uid, created, pid) available in Manage Display. Provides special handling for comment threading with the In Reply To formatter.
Makes taxonomy term name field available in Manage Display.
Makes user name field available in Manage Display. Sets name as the label key to prevent duplicate display.
Makes aggregator feed and item fields (title, image, description) available in Manage Display.
Enables page title template for media entities.
Hooks
| Hook | Description |
|---|---|
hook_entity_type_build |
Enables base field custom preprocess skipping and page title template rendering for supported entity types (node, taxonomy_term, aggregator_feed, aggregator_item, comment, media). Also sets the user entity's label key to 'name' to prevent double display. |
hook_entity_base_field_info_alter |
Makes base fields display-configurable by calling setDisplayConfigurable('view', TRUE) and setting default display options. This is the core mechanism that enables base fields in Manage Display. |
hook_entity_view_alter |
Builds the submitted render element when the owner field uses the 'submitted' formatter. Combines the uid field, created field, user picture, and parent comment reference into a single themed element. |
hook_theme |
Defines theme implementations for submitted, submitted__comment, in_reply_to, and field template overrides. |
hook_form_node_type_form_alter |
Hides the legacy 'Display submitted' checkbox on content type forms since this setting is now controlled through Manage Display. |
hook_form_system_theme_settings_alter |
Hides theme settings for toggle_node_user_picture and toggle_comment_user_picture since the Submitted formatter has its own user picture setting. |
Troubleshooting
Clear the Drupal cache after installing the module. The module alters entity type definitions which are cached.
Ensure the 'created' field is also enabled in Manage Display. The Submitted formatter requires both 'uid' and 'created' fields to be visible to show the full 'Submitted by X on Y' format.
Check the formatter settings for the 'uid' field and ensure a view mode is selected for the user picture. Also verify that the user entity has a picture field configured and users have uploaded pictures.
The module hides this option via form alter. Clear the cache and ensure no other module is overriding this behavior.