Demystifying Rendered Content in Drupal 8 Twig Files

As promised, here's a **link to view my slides**. I also want to extend a big thank you to everyone who came to my talk, who asked questions, and who shared thier insights with us - it was a real treat having you all there!

New to Twig? It's a robust and elegant template engine for PHP. Once I started working with Twig, I instantly fell in love with it and here's why: it's lightweight, fairly quick to pick up, and very readable. Not only that, but I feel like I have ultimate control over the markup, including wrapping elements and rendering exactly the output I need. Theming Drupal has never been more dreamy!  

If you are new to front-end development in Drupal or a veteran, AND you are ready to take your project’s markup powerfully into your own hands then this talk is for you. 

During this session, I will take you through a brief intro into twig, the debugging process of sorting through twig variables using xdebug in PHPStorm, mention other helpful debugging tools at our disposal, and share common patterns I found helpful for rendering content in twig files. 

If time allows, I also hope to demonstrate how to use Display Suite, taking your Twig files to exciting new heights.


Session Track

Front End

Experience level


Drupal Version

Drupal 8.x

Session Time Slot(s)

04/25/2017 - 15:45 to 04/25/2017 - 16:45
308 - Pantheon