Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Friendly Links and Dates in Twig

Video loading...

Transcript language code: 

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:08
    Let's look at a couple of things that are hiding
  • 0:11
    in those new template files I created.
  • 0:15
    Open up index.html.twig and notice the "for" tag, which
  • 0:19
    loops over the entities variable we're passing to the template.
  • 0:24
    You're going to loop over a lot of things in your Twig days,
  • 0:27
    so take a close look at the syntax.
  • 0:30
    Further down, check out how we link the show page for each event.
  • 0:34
    Instead of hard coding the URL, Symfony
  • 0:36
    generates the URL based on the route.
Loading ...

Friendly Links and Dates in Twig


We've got our Twig template files, and in this lesson we're going to take a closer look at working with creating links with the Twig path function, and making our dates make sense of the Twig date filter.

Log in or sign up to download companion files.
Additional resources: