New Class: How to Use the Twig Template Engine
This week, we’re happy to add a new and much-requested class to the OSTraining library, How to Use the Twig Template Engine.
Twig is a very powerful template engine for PHP. Twig is safe, fast, easy-to-learn and is used by many different platforms. Drupal 8 uses Twig by default, plus we’ve also come across wonderful examples of Twig being used in WordPress and Joomla.
In this class, you’ll learn how to use Twig for your projects.
In the first half of the class, you’ll see how to install and configure Twig. You’ll then explore Twig’s syntax, including filters, comments, math operators and more.
In the second half of the class, you use if/else statements, includes statements and extensions to create powerful and flexible layouts.