Skip to content

Commit 34f5dfa

Browse files
committed
[Router] Marking variable as important
symfony/symfony#29599
1 parent a95f4f0 commit 34f5dfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routing.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ So how can you make ``blog_list`` once again match when the user visits
341341
Now, when the user visits ``/blog``, the ``blog_list`` route will match and
342342
``$page`` will default to a value of ``1``.
343343

344+
When you generate URL for path ``blog_list`` without adding ``page`` parameter Router
345+
will generate ``/blog/``. Note that it doesn't use default value ``1``. To generate
346+
``/blog/1`` mark variable as important adding ``!`` before the name: ``/blog/{!page}``.
347+
344348
.. index::
345349
single: Routing; Advanced example
346350
single: Routing; _format parameter

0 commit comments

Comments
 (0)