Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 34f5dfa

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

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎routing.rst

Copy file name to clipboardExpand all lines: routing.rst
+4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.