Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293450

Twig debug output does not show the base hook when a theme suggestion is called directly

$
0
0

Updated: Comment #0

Problem/Motivation

When a theme suggestion is called directly, like theme('comment__node_article', …), the Twig debug output does not show the base template - in this case comment.html.twig.

Proposed resolution

In theme(), add a 'base hook' key to the $variables array when needed. Have the Twig debug code look for this key and append it to the theme suggestion debug information if found.

Remaining tasks

Write tests.

User interface changes

Twig debug output will display the base template when theme suggestions are called directly.

API changes

No user-facing API changes. A new key will sometimes be available in the $variables array, this may or may not be useful to themers and module developers.

#1751194: Introduce hook_theme_suggestions_alter() and hook_theme_suggestions_HOOK_alter()


Viewing all articles
Browse latest Browse all 293450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>