Score:0

html.html.twig Template Name for content type

eg flag

https://www.drupal.org/docs/theming-drupal/twig-in-drupal/twig-template-naming-conventions gives the example of html--node--[nodeid].html.twig for an individual node - what template name can I use for html.html.twig for a content type such as Article?

cn flag
Try enabling debugging and check the template names that get printed: https://www.drupal.org/docs/theming-drupal/twig-in-drupal/debugging-twig-templates
Score:0
dz flag

You can create your own theme suggestions. If you want to create a custom suggestion for html.html.twig, you need to use the hook hook_theme_suggestion_html_alter.

in your theme_name.theme file add the following function:

function theme_name_theme_suggestion_html_alter(array &$suggestions, array $variables) {
  if ($node = \Drupal::routeMatch()->getParameter('node')) {
    $suggestions[] = 'html__' . $node->bundle();
}
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.