From 3f4b14674b1f9285b77063be95bc60f70b71dce8 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 30 Jan 2013 22:26:24 +0100 Subject: [PATCH] added hint for twig url function --- developer_manual/app/routes.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/developer_manual/app/routes.rst b/developer_manual/app/routes.rst index 1548b400f..795a221d8 100644 --- a/developer_manual/app/routes.rst +++ b/developer_manual/app/routes.rst @@ -33,7 +33,11 @@ The first argument is the name of your route. This is used as an identifier to g 1))); -If Twig templates are used, the linkToRoute method has to be evaluated in the controller and passed as a parameter. In the future there will be an own filter for generating the URL in Twig templates. +In Twig templates you can use the :js:func:`url` function: + +.. code-block:: js + + {{ url('yourappname_routename', {value: '1'}) }} In JavaScript you can get the URL for a route like this: