Skip to content

Commit

Permalink
Clarify example
Browse files Browse the repository at this point in the history
  • Loading branch information
ravage84 authored Sep 25, 2018
1 parent a8e4436 commit d3de88d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions en/views/helpers/url.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ string parameter that shares a name with one of your route placeholders.

URL for named route::

echo $this->Url->build(['_name' => 'product-page', 'slug' => 'i-m-slug']);

// Assuming route is setup like:
// Assuming a route is setup as a named route:
// $router->connect(
// '/products/:slug',
// [
Expand All @@ -80,6 +78,9 @@ URL for named route::
// '_name' => 'product-page',
// ]
// );

echo $this->Url->build(['_name' => 'product-page', 'slug' => 'i-m-slug']);
// Will result in:
/products/i-m-slug

The 2nd parameter allows you to define options controlling HTML escaping, and
Expand Down

0 comments on commit d3de88d

Please sign in to comment.