diff --git a/book/routing.rst b/book/routing.rst index 75898e25573..05f40b9d22d 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1330,7 +1330,9 @@ method:: $this->generateUrl('blog_show', array('slug' => 'my-blog-post'), true); // http://www.example.com/blog/my-blog-post -From a template, it looks like this: +From a template, in Twig, simply use the ``url()`` function (which generates an absolute URL) +rather than the ``path()`` function (which generates a relative URL). In PHP, pass ``true`` +to ``generateUrl()``: .. configuration-block::