@@ -363,7 +363,7 @@ With all of this in mind, check out this advanced example:
363
363
{
364
364
/**
365
365
* @Route(
366
- * "/articles/{_locale}/{year}/{title }.{_format}",
366
+ * "/articles/{_locale}/{year}/{slug }.{_format}",
367
367
* defaults={"_format": "html"},
368
368
* requirements={
369
369
* "_locale": "en|fr",
@@ -372,7 +372,7 @@ With all of this in mind, check out this advanced example:
372
372
* }
373
373
* )
374
374
*/
375
- public function showAction($_locale, $year, $title )
375
+ public function showAction($_locale, $year, $slug )
376
376
{
377
377
}
378
378
}
@@ -381,7 +381,7 @@ With all of this in mind, check out this advanced example:
381
381
382
382
# app/config/routing.yml
383
383
article_show :
384
- path : /articles/{_locale}/{year}/{title }.{_format}
384
+ path : /articles/{_locale}/{year}/{slug }.{_format}
385
385
defaults : { _controller: AppBundle:Article:show, _format: html }
386
386
requirements :
387
387
_locale : en|fr
@@ -398,7 +398,7 @@ With all of this in mind, check out this advanced example:
398
398
http://symfony.com/schema/routing/routing-1.0.xsd" >
399
399
400
400
<route id =" article_show"
401
- path =" /articles/{_locale}/{year}/{title }.{_format}" >
401
+ path =" /articles/{_locale}/{year}/{slug }.{_format}" >
402
402
403
403
<default key =" _controller" >AppBundle:Article:show</default >
404
404
<default key =" _format" >html</default >
@@ -418,7 +418,7 @@ With all of this in mind, check out this advanced example:
418
418
$collection = new RouteCollection();
419
419
$collection->add(
420
420
'article_show',
421
- new Route('/articles/{_locale}/{year}/{title }.{_format}', array(
421
+ new Route('/articles/{_locale}/{year}/{slug }.{_format}', array(
422
422
'_controller' => 'AppBundle:Article:show',
423
423
'_format' => 'html',
424
424
), array(
0 commit comments