Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine

Twig Templating for Friendly Frontend Devs


What you'll be learning

This tutorial uses Twig 1. There are newer versions of Twig, but they don't contain significant differences. So, Twig on!
// composer.json
    "require": []

Welcome to Twig! If you're a frontend developer and you're using Twig in your project, then this course is for you! We'll talk about how to use Twig from the ground-up, clearly pointing out its syntax and then graduating to some really neat and advanced tricks. Twig is awesome to work with, so don't just use Twig, master it!

We'll learn:

  • The Twig syntaxes: {{ }} and {% %}
  • Functions and filters
  • Debugging with the dump() function
  • Handling arrays and objects
  • Template Inheritance (extends & block)
  • Tests, looping tricks, and shortcut syntaxes
  • Macros (Twig functions)
  • Whitespace control, escaping and more!

Ok, let's go!

Your Guides

Ryan Weaver Leanna Pelham

Buy Access

Questions? Conversation?