Skip to content

Commit c8cb740

Browse files
hhamonfabpot
hhamon
authored andcommitted
[doc] fixed Twig sample code that illustrates how to generate links between pages with the "path" statement
1 parent 39d2047 commit c8cb740

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

guides/security/authentication.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ And the corresponding template:
330330
<div>{{ error }}</div>
331331
{% endif %}
332332
333-
<form action="{% path "_security_check" %}" method="post">
333+
<form action="{{ path('_security_check') }}" method="post">
334334
<label for="username">Username:</label>
335335
<input type="text" id="username" name="_username" value="{{ last_username }}" />
336336

quick_tour/the_view.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ updated by changing the configuration:
227227

228228
.. code-block:: jinja
229229
230-
<a href="{% path 'hello' with { 'name': 'Thomas' } %}">Greet Thomas!</a>
230+
<a href="{{ path('hello', { 'name': 'Thomas' }) }}">Greet Thomas!</a>
231231
232232
The ``path`` tag takes the route name and an array of parameters as arguments.
233233
The route name is the main key under which routes are referenced and the

0 commit comments

Comments
 (0)