Debugging Mistakes and Twig Macros

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:05
    with Leanna Pelham
  • 0:09
    Twig is a lot of fun to work with.
  • 0:11
    And if you've made it this far, you know a lot about it.
  • 0:15
    In this chapter let's make some mistakes and debug them.
  • 0:18
    We'll also talk about macros, which are
  • 0:21
    like functions you create in Twig.
  • 0:24
    Like with anything, there are a lot of ways to make mistakes in Twig.
  • 0:28
    Fortunately, Twig usually gives you very clear errors
  • 0:31
    and the line number the error is on.
  • 0:33
    We saw an error earlier when we put some content
Loading ...

Debugging Mistakes and Twig Macros

Loading...

In this tutorial we're going to purposely make some common Twig mistakes, debug them, and figure out how to fix them. We'll also look at a way to make parts of your Twig code easily reusable, using macros.

Downloads: 
Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.