Archived video

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

Alternate resources: 

Generating URLs in Symfony 3

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:08
    We now have 2 pages,
  • 0:10
    the HTML /genus/{genusName} page and the JSON endpoint.
  • 0:15
    OK, OK, the JSON endpoint isn't really a page,
  • 0:19
    at least not in the traditional sense.
  • 0:21
    But pretend it is for a second.
  • 0:23
    Pretend that we want to link from the HTML page
  • 0:27
    to the JSON endpoint so the user can see it.
  • 0:29
    Yes, yes, we're going to do something fancier
  • 0:32
    with JavaScript in a minute,
  • 0:34
    but stay with me, this is important.

Generating URLs in Symfony 3

Loading...

In this lesson, you'll learn how to generate URLs in Symfony 3 and use Twig's path() function to output HTML links based on the name of the route.

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