I am making a template in Drupal 8. At this moment, I made a theme in the /themes directory; there, I have my .theme file and a copy of the html.html.twig file from the core/themes/stable directory.
I have enabled Twig debugging mode and in the Chrome inspect tool I read the following.
<!-- FILE NAME SUGGESTIONS:
* html--front.html.twig
* html--.html.twig
x html.html.twig
-->
I added the following hook to the theme file.
function testTheme_suggestions_html_alter(array &$suggestions, array $variables) {
$suggestions[] = 'html__testHTML';
}
After clearing the cache, there isn't any change to the file name suggestions.
Also I have activated kint()
in html.html.twig file that is located in my theme root, but kint()
also shows only these variables.
'theme_hook_suggestions' => array(2)
string(6) "html__"
string(11) "html__front"
Why doesn't the new suggestions appear?