Deep Dive into the Twig layer in Drupal 8.
Twig is a new PHP-based, compiled, templating framework that provides the the default theming engine in Drupal 8. It brings about significant improvements that make front-end development easier, faster and more secure.
One of the main benefits of Twig is to hand the power to create really awesome designs back to the designers, and to unfetter them from development cycles and constraints. In this session we'll take an in-depth look at what specific changes it brings and how to use Twig in Drupal 8-- as well as how to get started using Twig in Drupal 7.
- Some of the topics we'll cover:
- What’s happening to theme functions?
- How are render arrays and drupal_render() changing?
- How does Twig work with the new “Scotch” Blocks & Layouts Everywhere page assembly? (unfortunately, still languishing in contrib)
- How are Twig templates cached and how does this affect performance?
- How to debug a compiled template?
- How do I convert my existing Drupal theme to Twig?
Of course one of the most important questions with Twig –as with any shiny new thing that’s being swapped into an existing stack– is “What’s the Upgrade Path?” -- In this session we’ll go over how to use a Drupal module to automatically convert your existing Drupal 7 themes to Twig.