Fabian Franz joins me this week to talk about what Twig is, and how it got into Drupal 8 Core.

Background on Twig

  • Before we jump into what Twig is, what it does, and how it got into core, I want to get a little background on the topic.
  • Twig is an external project that we’re integrating into Drupal, right?
  • Who started the Twig project?
    • Fabien Potencier, founder of Symfony
  • When was that?
    • October 07, 2009 (http://fabien.potencier.org/article/34/templating-engines-in-php)
    • When I started with Drupal, another coincidence?
  • What is Twig replacing?
    • PHP Template
  • Why?
    • Easier syntax
    • Security
    • Endless possibilities

Twig as it is now

Jen Lampton was on the Drupalize.Me Podcast back in September talking with Addie about Twig. But, for the three people who are listening to this, and aren’t subscribed to the Drupalize.Me podcast, can you tell us a little bit about:

  • How it affects site administrators/clients?
  • How it affects site-builders?
  • How it affects theme developers?
  • How it affects module developers?
  • Is there a user interface that comes with Twig? Or is this just for coders?
  • Does Twig affect the way we use Panels, Display Suite, Context or other layout modules?
  • How does Twig affect:
    • Security
    • Performance
    • Multilingual sites

Twig in Core!

<

ul>

  • How long has the “get Twig in core” process been in-progress?
  • How many people have been working on getting Twig into Drupal?
    • I don’t really know, but over all code sprints and sandbox commits I would say 50-100 with a core team of around 5-10 people.
    • Just looking at who has sandbox commit access is exciting.

  • What was/is your involvement with that process?
    • Late to the game: 24th of September, through chx role call
    • Found an issue, thought about a different solution, worked on it
    • First working approach posted on my birthday :-D
    • Solved a real blocker (references in twig land) with some MAGIC!
    • Then First real Core Patch by me: Oct 4

  • When did it get committed to Core?
    • LIVE COMMIT! :-D on Nov, 3rd. Soo exciting!

  • How much of core has been replaced with Twig?
  • If I download Drupal 8 today, will the core themes all be ‘Twig themes’?
  • Questions from Twitter

    • Micah Godbolt (@micahgodbolt): what are the major frustrations in d7 that twig will be addressing in d8
    • Cameron Eagans (@cweagans): Pretty much everyone knows that Twig is awesome, and the ones that don't are in denial =P
    • Karyn Cassio (@TechGirlGeek): Kudos to the team implementing #TWIG for #Drupal 8's theme layer. Exciting stuff.
    • Carson Black (@carsonblack): what kind of feedback have they received from designers about how it works?
    • Carson Black: have they seen an increase in the # of designers since they created twig?
    • Transition (@Transition): what are the best ways to get started learning it? It'll be new to most Drupal Front-End devs.
    • Transition: also, are there any differences b/w using Twig on it's own vs. using it in Drupal?
    • Jared Stoneberg (@rock_soup): really impressed that twig actually works w/render arrays