From 34f5dfab0f9f735d903f83ac01fe348d1dd08ff9 Mon Sep 17 00:00:00 2001 From: Vladimir Luchaninov Date: Sat, 15 Dec 2018 11:49:27 +0200 Subject: [PATCH] [Router] Marking variable as important https://github.com/symfony/symfony/pull/29599 --- routing.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routing.rst b/routing.rst index 930e4dd5a3d..65c8221793f 100644 --- a/routing.rst +++ b/routing.rst @@ -341,6 +341,10 @@ So how can you make ``blog_list`` once again match when the user visits Now, when the user visits ``/blog``, the ``blog_list`` route will match and ``$page`` will default to a value of ``1``. +When you generate URL for path ``blog_list`` without adding ``page`` parameter Router +will generate ``/blog/``. Note that it doesn't use default value ``1``. To generate +``/blog/1`` mark variable as important adding ``!`` before the name: ``/blog/{!page}``. + .. index:: single: Routing; Advanced example single: Routing; _format parameter pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy