Theming

Whitespace Control with Twig for Drupal 8, 9, 10, and 11

Last updated
Categories
Up-to-date with minor version
11.0.x

Do you cringe at the sight of untidy whitespace or (gasp) no whitespace at all when you View Source? Learn how to tame whitespace in Twig template files in this tutorial. By the end of this lesson, you will be able to recognize how Twig controls whitespace and how you can do the same in your Drupal template files.

Frontend Theming