Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

SymfonyCasts

Twig Templating for Friendly Frontend Devs

via SymfonyCasts

Overview

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!

Syllabus

  • Twig: The Basics
  • Functions, Filters and Debugging with dump
  • Using Objects and Array Keys
  • Using a Layout: Template Inheritance
  • Including other Templates
  • If Statements with "Tests"
  • The for "loop" and inline "if" Syntax
  • Mistakes and Macros
  • Extra Credit Tricks and HTML Escaping

Taught by

Ryan Weaver and Leanna Pelham

Reviews

Start your review of Twig Templating for Friendly Frontend Devs

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.