Skip to main content
2 of 2
added 56 characters in body
Kevin
  • 28k
  • 12
  • 95
  • 196

You can provide node level content type templates with the pattern node--node_type.html.twig.

So, for an article it would be node--article.html.twig.

In your case, it would be node--recette.html.twig. You can also provide view mode level twigs the same way, with node--node_type--view_mode.html.twig files.

Lets say you wanted to customize the teaser display markup:

node--recette--teaser.html.twig

If you enable twig debugging, you can see in your HTML source (comments) which template is being used, and what other template pattern names are available to you:

https://www.drupal.org/docs/8/theming/twig/debugging-twig-templates

Going any further than that, you would need to implement hook_theme_suggestions_alter to get more custom template names based on some sort of logic.

Kevin
  • 28k
  • 12
  • 95
  • 196