fabpot/Silex — pull request #524 by igorw (2012-10-30 15:39:30+00:00)
Title: renderRoute() twig function for rendering named routes

Using something like this causes issues:

{{ render(path('cart')) }}

Because the url_generator uses the global request_context which might have a baseUrl prefix. The prefix is added by the URL generator, but is not stripped by the render() function.

This new function fixes the issue by generating the URL with a separate request_context that does not include the baseUrl prefix.