Drupal 8’s theming engine is now powered by Twig, but how do we turn over a new leaf after years spent using PHPTemplate to drive our themes? It’s time to take the plunge and discover how easy it is to start working with Twig today. Let’s put Twig under the microscope and compare what’s new and what’s stayed the same!
In this session you’ll get an overview of the key differences between Twig in Drupal 8 and PHPTemplate in Drupal 7 when it comes to:
- Creating new custom templates.
- Overriding default templates.
- Using conditionals and control structures within a template.
- Assigning and modifying variables in a theme.
- Applying filters, generating links, and building render arrays for improved security, performance and caching.
- Debugging templates.
You'll leave this session prepared to start working with Twig templates in Drupal 8. This session will assume that you are familiar with templates in Drupal 7.
Note: If you're looking for extra help with Drupal 8 and Twig, be sure to join the slack channel! https://slackinvite.me/to/drupaltwig