customize

You are here

Chapter Three: Twig Concepts in Drupal 8 Themes - Part II

In the previous post I covered how to use the Component Libraries module and Twig to create simple reusable components, using an SVG sprite icon template as an example.

Part 2: Applying Twig Concepts to Write Better Code

When learning Drupal theming, overriding templates is one of the key topics of interest. It’s a simple thing. Copy the source template into your theme, modify it and clear the cache. Easy! However, doing just that over and over again, can lead to a mess of unmaintainable code.

Source: 
https://www.chapterthree.com/blog/twig-concepts-drupal-8-themes-part-ii