O'Reilly logo

Drupal 8 Development Beginner's Guide - Second Edition by Kurt Madel, Malabya Tewari, Rakesh James, Krishna Kanth, Edward Crompton, Samuel Keen, Tassos Koutlas, Neeraj Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction to templating and Twig

We skipped over templates and Twig in the previous section, so let's discuss them in more depth.

Templates will become the bread and butter of your experience of theming Drupal. They are the way we logically filter our data and create our required HTML structure. A standard page on a Drupal site is built from a set of nested templates. At each level of the nested structure, different variables are available to you that allow you to render the content you desire. Any of the templates mentioned next can be copied into your theme, either from Drupal core or your parent theme. The base versions of all the templates live in core, but your parent theme may already have templates you can copy that have a structure that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required