3.4 Demonstrate ability to build or override Twig templates for defining layout content
Previous3.3 Demonstrate ability to use Twig syntaxNext3.5 Demonstrate ability to write template pre-process functions for overriding custom output
Last updated
Last updated
Review how to print variables, how to filter variables, how to structure a template and how to add a template suggestion.
Few changes to note from D7 to D8
All template files end in .html.twig
.
To override a template, add more specificity to the name of your template file to override the default twig template. For example, to override a block template, rename your new file block.html.twig
or block--module_name.html.twig