From 9de54b2ab0c3a79301ca24f202237216d24acb46 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 17 Dec 2014 13:52:20 +0100 Subject: [PATCH 1/3] add route postfix info --- developer_manual/app/routes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/developer_manual/app/routes.rst b/developer_manual/app/routes.rst index e20bedf30..2f8f95f27 100644 --- a/developer_manual/app/routes.rst +++ b/developer_manual/app/routes.rst @@ -55,6 +55,7 @@ The route array contains the following parts: } * **method** (Optional, defaults to GET): The HTTP method that should be matched, (e.g. GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH) * **requirements** (Optional): lets you match and extract URLs that have slashes in them (see **Matching suburls**) +* **postfix** (Optional): lets you define a route id postfix. Since each route name will be transformed to a route id (**page#method** -> **myapp.page.method**) and the route id can only exist once you can use the postfix option to alter the route id creation by adding a string to the route id e.g.: **'name' => 'page#method', 'postfix' => 'test'** will yield the route id **myapp.page.methodtest**. This makes it possitble to add more than one route/url for a controller method Extracting values from the URL ============================== From 896806a0e0c4412e6b9a0cde00b0984c7ac8b708 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 17 Dec 2014 13:56:49 +0100 Subject: [PATCH 2/3] fix route defaults docs --- developer_manual/app/routes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/developer_manual/app/routes.rst b/developer_manual/app/routes.rst index 2f8f95f27..f07e21374 100644 --- a/developer_manual/app/routes.rst +++ b/developer_manual/app/routes.rst @@ -56,6 +56,7 @@ The route array contains the following parts: * **method** (Optional, defaults to GET): The HTTP method that should be matched, (e.g. GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH) * **requirements** (Optional): lets you match and extract URLs that have slashes in them (see **Matching suburls**) * **postfix** (Optional): lets you define a route id postfix. Since each route name will be transformed to a route id (**page#method** -> **myapp.page.method**) and the route id can only exist once you can use the postfix option to alter the route id creation by adding a string to the route id e.g.: **'name' => 'page#method', 'postfix' => 'test'** will yield the route id **myapp.page.methodtest**. This makes it possitble to add more than one route/url for a controller method +* **defaults** (Optional): If this setting is given, a default value will be assumed for each url parameter which is not present. The default values are passed in as a key => value par array Extracting values from the URL ============================== From 09a3ad9ba6519a23550f2c30763a3edaa713ded3 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 26 Dec 2014 19:04:11 +0100 Subject: [PATCH 3/3] fix typo --- developer_manual/app/routes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/app/routes.rst b/developer_manual/app/routes.rst index f07e21374..d443038f7 100644 --- a/developer_manual/app/routes.rst +++ b/developer_manual/app/routes.rst @@ -55,7 +55,7 @@ The route array contains the following parts: } * **method** (Optional, defaults to GET): The HTTP method that should be matched, (e.g. GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH) * **requirements** (Optional): lets you match and extract URLs that have slashes in them (see **Matching suburls**) -* **postfix** (Optional): lets you define a route id postfix. Since each route name will be transformed to a route id (**page#method** -> **myapp.page.method**) and the route id can only exist once you can use the postfix option to alter the route id creation by adding a string to the route id e.g.: **'name' => 'page#method', 'postfix' => 'test'** will yield the route id **myapp.page.methodtest**. This makes it possitble to add more than one route/url for a controller method +* **postfix** (Optional): lets you define a route id postfix. Since each route name will be transformed to a route id (**page#method** -> **myapp.page.method**) and the route id can only exist once you can use the postfix option to alter the route id creation by adding a string to the route id e.g.: **'name' => 'page#method', 'postfix' => 'test'** will yield the route id **myapp.page.methodtest**. This makes it possible to add more than one route/url for a controller method * **defaults** (Optional): If this setting is given, a default value will be assumed for each url parameter which is not present. The default values are passed in as a key => value par array Extracting values from the URL