Skip to content

Commit 5cd8431

Browse files
authored
Merge pull request #15 from Kiwikoti/feature/cms-page-2.1-recipe
2 parents 17f6afb + 908b48d commit 5cd8431

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports:
2+
- { resource: "@MonsieurBizSyliusCmsPagePlugin/Resources/config/config.yaml" }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
monsieurbiz_cms_page_admin:
2+
resource: "@MonsieurBizSyliusCmsPagePlugin/Resources/config/routing/admin.yaml"
3+
prefix: /%sylius_admin.path_name%
4+
5+
# Show page
6+
monsieurbiz_cms_page_show:
7+
path: /{_locale}/{slug}
8+
methods: [GET]
9+
requirements:
10+
slug: .+
11+
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$
12+
defaults:
13+
_controller: monsieurbiz_cms_page.controller.page::showAction
14+
_sylius:
15+
template: "@MonsieurBizSyliusCmsPagePlugin/shop/page/show.html.twig"
16+
repository:
17+
method: findOneEnabledAndPublishedBySlugAndChannelCode
18+
arguments:
19+
- $slug
20+
- "expr:service('sylius.context.locale').getLocaleCode()"
21+
- "expr:service('sylius.context.channel').getChannel().getCode()"
22+
- "expr:service('monsieurbiz.cms_page.datetime_provider').now()"
23+
condition: "not(context.getPathInfo() matches '`^%sylius.security.api_route%`') and service('monsieurbiz.cms_page.route_checker').checkPageSlug(request)"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"bundles": {
3+
"MonsieurBiz\\SyliusCmsPagePlugin\\MonsieurBizSyliusCmsPagePlugin": [
4+
"all"
5+
]
6+
},
7+
"copy-from-recipe": {
8+
"config/": "%CONFIG_DIR%/"
9+
}
10+
}

0 commit comments

Comments
 (0)