Gettin' Twiggy with Drupal

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 promise to make front-end development simpler, 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?
  • 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?

Putting everything together, we'll build a Responsive Drupal 8 Twig theme from scratch during the demo part of this session.

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?” -- Time permitting, we’ll go over how to use a Drupal module to automatically convert your existing Drupal 7 themes to Twig.

Theming & Mobile
Experience level: 
Session Time Slot(s):