Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Template Suggester

No security coverage Maintenance fixes only 41 sites

This module allows you to extend Drupal's default entity template suggestions with custom ones. It introduces a field type that lets you select these custom suggestions, enabling you to display content structures in various ways.

This module provides a new functionality that let you be able to extends the core entity templates suggestions with other totally cutomized.

The module provides a field type named template_suggester where you can select the new customized suggestion.

It gives you the ability to display one structure display in multiple ways.

REQUIREMENTS

The core field module.

INSTALLATION

Install as you would normally install a contributed Drupal module.

CONFIGURATION

  1. Create template_suggester.yml in your active theme folder and add your template suggestions.
  2. Add Template Suggester field in to your entity.
  3. Add a content and select suggestion as you wish.
  4. Once you have a different template for your content you have no limits to customize it.

Template suggestion Logic

  • ENTITY__SELECTED_SUGGESTER
  • ENTITY__CURRENT_BUNDLE__SELECTED_SUGGESTER
  • ENTITY__SELECTED_SUGGESTER__VIEW_MODE
  • ENTITY__CURRENT_BUNDLE__SELECTED_SUGGESTER__VIEW_MODE

Example yml configuration

node: (ENTITY)
  style_1: (SELECTED_SUGGESTER)
  name: Visible name
  bundles:
    - article (CURRENT_BUNDLE)

Suggestion Output

node--style-1.html.twig
node--article--style-1.html.twig
node--style-1--full.html.twig
node--article--style-1--full.html.twig

Tested and works fine with follow entities.

  1. node
  2. taxonomy_term
  3. paragraph
Drupal 8–11

Ask your assistant about Template Suggester

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • field Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jul 2023
Latest release
7 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.1 Stable 8–11 Mar 13, 2026
2.x-dev Dev 8–11 Mar 13, 2026
2.0.0 Stable 8–10 Jul 27, 2023