drupal Twig


Twig is the template engine that is part of Drupal 8. In Drupal 8, Twig files have the extension .html.twig and are used in every aspect of Drupal theming. Entities, fields, views can all be rendered using .html.twig files.

In this topic the goal is to have a cookbook on how work with Twig in the context of Drupal. If you want to learn more about the syntax or functions available consult the documentation.