Skip to content

Commit

Permalink
Merge pull request #48 from maximehuran/feature/correct-show-link
Browse files Browse the repository at this point in the history
Avoid channel context error in show button while saving a page with error
  • Loading branch information
maximehuran authored Jan 19, 2023
2 parents d28db29 + 21f7f09 commit 96830da
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/Resources/config/routing/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ monsieurbiz_sylius_cms_page_admin:
alias: monsieurbiz_cms_page.page
section: admin
templates: "@SyliusAdmin\\Crud"
except: ['show']
except: ['show', 'update']
redirect: update
grid: monsieurbiz_cms_page
vars:
all:
subheader: monsieurbiz_cms_page.ui.pages_subheader
templates:
form: "@MonsieurBizSyliusCmsPagePlugin/Admin/Page/_form.html.twig"
toolbar: "@MonsieurBizSyliusCmsPagePlugin/Admin/Page/Update/_toolbar.html.twig"
index:
icon: 'file alternate'
type: sylius.resource
Expand All @@ -24,3 +23,20 @@ monsieurbiz_sylius_cms_page_ajax_generate_page_slug:
defaults:
_controller: MonsieurBiz\SyliusCmsPagePlugin\Controller\Admin\Page\PageSlugController::generateAction


monsieurbiz_cms_page_admin_page_update:
path: /pages/{id}/edit
methods: [GET, PUT, PATCH]
defaults:
_controller: monsieurbiz_cms_page.controller.page:updateAction
_sylius:
section: admin
permission: true
redirect: referer
template: "@SyliusAdmin/Crud/update.html.twig"
vars:
subheader: monsieurbiz_cms_page.ui.pages_subheader
icon: file alternate
templates:
form: "@MonsieurBizSyliusCmsPagePlugin/Admin/Page/_form.html.twig"
toolbar: "@MonsieurBizSyliusCmsPagePlugin/Admin/Page/Update/_toolbar.html.twig"

0 comments on commit 96830da

Please sign in to comment.