summaryrefslogtreecommitdiffstats
path: root/user_guide
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2010-01-14 16:14:51 +0100
committerDerek Allard <derek.allard@ellislab.com>2010-01-14 16:14:51 +0100
commite28c7ae966df7e698727f28b75356f692ae84a8e (patch)
treee39ce28e1f50922fcd715205af29a49159cba50a /user_guide
parenta7b2e451ef9f9c471da43442633506bb6e33dde3 (diff)
fixing a routing example
Diffstat (limited to 'user_guide')
-rw-r--r--user_guide/general/routing.html11
1 files changed, 3 insertions, 8 deletions
diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html
index ab79c9265..01a8aef8e 100644
--- a/user_guide/general/routing.html
+++ b/user_guide/general/routing.html
@@ -96,13 +96,8 @@ the "catalog" class and the "product_lookup" method are instead used.</p>
<p>You can match literal values or you can use two wildcard types:</p>
-<p>
-:num<br />
-:any
-</p>
-
-<p><strong>:num</strong> will match a segment containing only numbers.<br />
-<strong>:any</strong> will match a segment containing any character.
+<p><strong>(:num)</strong> will match a segment containing only numbers.<br />
+<strong>(:any)</strong> will match a segment containing any character.
</p>
<p class="important"><strong>Note:</strong> Routes will run in the order they are defined.
@@ -118,7 +113,7 @@ Higher routes will always take precedence over lower ones.</p>
<code>$route['blog/joe'] = "blogs/users/34";</code>
<p>A URL containing the segments blog/joe will be remapped to the "blogs" class and the "users" method. The ID will be set to "34".</p>
-<code>$route['product/:any'] = "catalog/product_lookup";</code>
+<code>$route['product/(:any)'] = "catalog/product_lookup";</code>
<p>A URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup" method.</p>
<code>$route['product/(:num)'] = "catalog/product_lookup_by_id/$1";</code>