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.
April 10, 2017
April 04, 2017
Twig is a powerful templating engine with many useful features. In the context of Drupal, especially when coming from a Drupal 7 way of doing things, it can be easy to overlook many of these features in the interest of just getting the job done quickly. However, taking the time to learn Twig beyond just printing variables is worthwhile, because it can help you solve common problems.