From e0e1b84994cc78beeda17543a50c4f78514a3734 Mon Sep 17 00:00:00 2001 From: "haertl.mike" <> Date: Fri, 9 Jan 2009 09:55:01 +0000 Subject: Added wildcard examples to QST --- .../protected/pages/Configurations/UrlMapping.page | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'demos') diff --git a/demos/quickstart/protected/pages/Configurations/UrlMapping.page b/demos/quickstart/protected/pages/Configurations/UrlMapping.page index ec393012..bdd0b81d 100644 --- a/demos/quickstart/protected/pages/Configurations/UrlMapping.page +++ b/demos/quickstart/protected/pages/Configurations/UrlMapping.page @@ -111,6 +111,48 @@ object. For example, $this->Request['year']. in particular order. For example, placing the most specific mappings first.

+

Since version 3.1.4, Prado also provides wildcard patterns to use friendly URLs +for a bunch of pages in a directory with a single rule. Therefore you can use the {*} wildcard +in your pattern to let Prado know, where to find the ServiceID in your request URL. You can also specify +parameters with these patterns if a lot of pages share common parameters.

+ + + + + + + +

With these rules, any of the following URLs will be recognized: +

+

+ +

As above, put more specific rules before more common rules as the first matching rule will be used.

+ +

To make configuration of friendly URLs for multiple pages even easier, you can also use UrlFormat="Path" +in combination with wildcard patterns. In fact, this feature only is available in combination with wildcard rules:

+ + + + + + +

Parameters will get appended to the specified patterns as name/value pairs, separated by a "/". +(You can change the separator character with UrlParamSeparator.) +

+

+

Constructing Customized URLs

Since version 3.1.1, TUrlMapping starts to support constructing customized URLs based on the provided patterns. To enable this feature, set TUrlMapping.EnableCustomUrl to true. When THttpRequest.constrcutUrl() is invoked, the actual URL construction work will be delegated to a matching TUrlMappingPattern instance. It replaces the parameters in the pattern with the corresponding GET variables passed to constructUrl(). -- cgit v1.2.3