How to Use the Twig Template Engine
Released: May 3, 2016
Certificate: Finish lessons and pass the quiz with 70%
Twig is a very powerful template engine for PHP. Twig is safe, fast, easy-to-learn and is used by many different platforms.
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.
Download the exercise files:
Robert learned HTML/CSS back in 2008 when he decided to start a film review site, and he continued adding to his site file-by-file the old-fashioned way for a year. When he asked a web developer friend how to build a site that "automatically lists content on the homepage and stuff," he was pointed to Drupal.
Since then, Robert has continued to build his experience with the CMS by using it on his own projects and by managing other brands' pre-existing Drupal sites. In doing so, he has learned some of the best ways to use the tools Drupal has available--and what mistakes to avoid.
In his spare time, Robert trains Brazilian Jiu Jitsu and works on too many side programming projects. He is also the author of two books.