From 0e4247b102bba436d6704d9b3742341079bb79eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 25 Feb 2018 06:19:52 +0100 Subject: [PATCH 1/1] Switch to page controller Switch to slug system --- Resources/config/routing.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index 86a99c9..448e728 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -22,24 +22,27 @@ contact: articles: path: /{_locale}/articles - defaults: { _controller: RapsysBlogBundle:Default:articles } + defaults: { _controller: RapsysBlogBundle:Page:articleIndex } requirements: _locale: '%blog.locales%' articles_article: path: /{_locale}/articles/{_article} - defaults: { _controller: RapsysBlogBundle:Default:article } + defaults: { _controller: RapsysBlogBundle:Page:articleRead } requirements: _locale: '%blog.locales%' + #_article: '\d+' + _article: '[a-z0-9-]+' -tags: - path: /{_locale}/tags - defaults: { _controller: RapsysBlogBundle:Default:tags } +keywords: + path: /{_locale}/keywords + defaults: { _controller: RapsysBlogBundle:Page:keywordIndex } requirements: _locale: '%blog.locales%' -tags_tag: - path: /{_locale}/tags/{_tag} - defaults: { _controller: RapsysBlogBundle:Default:tag } +keywords_keyword: + path: /{_locale}/keywords/{_keyword} + defaults: { _controller: RapsysBlogBundle:Page:keywordRead } requirements: - _locale: '%blog.locales%' + _locale: '%blog.locales%' + _keyword: '[a-z0-9-]+' -- 2.41.1