This project is not covered by Drupal’s security advisory policy.

This module maps theme hook suggestions made by Drupal Core to other names. For example, Drupal Core might suggest "node__blogpost__teaser" as a potential override for a the node template when the entity bundle is "blogpost" and the given view mode is "teaser." The site builder/themer may want to map this suggestion to a template named something like "node__illustrated_list_item" where "illustrated_list_item" is the name of a design component in a stand-alone design system. This module can be configured to look for the suggestion "node__blogpost__teaser" and replace that suggestion with "node__illustrated_list_item." While this naming change may be academic, the capability can help organize a site where some (but not all) bundles share templates within the same view mode.

In such an example the configuration might look like:

node__blogpost__teaser|node__illustrated_list_item
node__podcastepisode__teaser|node__illustrated_list_item
node__event__teaser|node__text_list_item
node__pressrelease__teaser|node__text_list_item

This module is meant to partially fulfill a suggestion I (Steve Persch) made in my presentation "Rendering HTML with Drupal: Past, Present and Future" that site builders name their templates in accordance with their designers' understanding of the given components rather than based on Drupal's data structures.

This module intends to reduce the need for custom coded implementations of hook_theme_suggestions_HOOK or hook_theme_suggestions_alter because it is not reasonable to expect everyone writing/editing templates to be comfortable writing/editing hooks in PHP. The examples on this project page deal with node view modes but this module will work with any theme hook.

Supporting organizations:

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • caution No further development
    No longer developed by its maintainers.
  • Created by stevector on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases