Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8ae46d2

Browse filesBrowse files
committed
minor #7015 Replace title placeholder name with slug (bocharsky-bw)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #7015). Discussion ---------- Replace title placeholder name with slug As we show slug in examples further: - /articles/en/2010/my-post - /articles/fr/2010/my-post.rss - /articles/en/2013/my-latest-post.html Commits ------- 4760bf4 Replace title placeholder name with slug
2 parents 7a02e0c + 4760bf4 commit 8ae46d2
Copy full SHA for 8ae46d2

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎routing.rst

Copy file name to clipboardExpand all lines: routing.rst
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ With all of this in mind, check out this advanced example:
363363
{
364364
/**
365365
* @Route(
366-
* "/articles/{_locale}/{year}/{title}.{_format}",
366+
* "/articles/{_locale}/{year}/{slug}.{_format}",
367367
* defaults={"_format": "html"},
368368
* requirements={
369369
* "_locale": "en|fr",
@@ -372,7 +372,7 @@ With all of this in mind, check out this advanced example:
372372
* }
373373
* )
374374
*/
375-
public function showAction($_locale, $year, $title)
375+
public function showAction($_locale, $year, $slug)
376376
{
377377
}
378378
}
@@ -381,7 +381,7 @@ With all of this in mind, check out this advanced example:
381381
382382
# app/config/routing.yml
383383
article_show:
384-
path: /articles/{_locale}/{year}/{title}.{_format}
384+
path: /articles/{_locale}/{year}/{slug}.{_format}
385385
defaults: { _controller: AppBundle:Article:show, _format: html }
386386
requirements:
387387
_locale: en|fr
@@ -398,7 +398,7 @@ With all of this in mind, check out this advanced example:
398398
http://symfony.com/schema/routing/routing-1.0.xsd">
399399
400400
<route id="article_show"
401-
path="/articles/{_locale}/{year}/{title}.{_format}">
401+
path="/articles/{_locale}/{year}/{slug}.{_format}">
402402
403403
<default key="_controller">AppBundle:Article:show</default>
404404
<default key="_format">html</default>
@@ -418,7 +418,7 @@ With all of this in mind, check out this advanced example:
418418
$collection = new RouteCollection();
419419
$collection->add(
420420
'article_show',
421-
new Route('/articles/{_locale}/{year}/{title}.{_format}', array(
421+
new Route('/articles/{_locale}/{year}/{slug}.{_format}', array(
422422
'_controller' => 'AppBundle:Article:show',
423423
'_format' => 'html',
424424
), array(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.