monsieurbiz/sylius-cms-page-plugin
Composer 安装命令:
composer require monsieurbiz/sylius-cms-page-plugin
包简介
This plugins allows you to add manage CMS pages using the Rich Editor
README 文档
README
Sylius CMS Pages
This plugins allows you to add manage CMS pages using the Rich Editor and the Media Manager.
If you want to know more about our editor, see the Rich Editor Plugin
If you want to know more about our editor, see the Media Manager Plugin
Compatibility
| Sylius Version | PHP Version |
|---|---|
| 2.0, 2.1 | 8.2 - 8.3 |
ℹ️ For Sylius 1.x, see our 1.x branch and all 1.x releases.
Installation
If you want to use our recipes, you can configure your composer.json by running:
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
composer require monsieurbiz/sylius-cms-page-plugin
If you do not use the recipes :
Change your config/bundles.php file to add the line for the plugin :
<?php return [ //.. MonsieurBiz\SyliusCmsPagePlugin\MonsieurBizSyliusCmsPagePlugin::class => ['all' => true], ];
Then create the config file in config/packages/monsieurbiz_sylius_cms_page_plugin.yaml :
imports: - { resource: "@MonsieurBizSyliusCmsPagePlugin/Resources/config/config.yaml" }
Finally import the routes in config/routes/monsieurbiz_sylius_cms_page_plugin.yaml :
monsieurbiz_cms_page_admin: resource: "@MonsieurBizSyliusCmsPagePlugin/Resources/config/routing/admin.yaml" prefix: /%sylius_admin.path_name% # Show page monsieurbiz_cms_page_show: path: /{_locale}/{slug} methods: [GET] requirements: slug: .+ _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ defaults: _controller: monsieurbiz_cms_page.controller.page::showAction _sylius: template: "@MonsieurBizSyliusCmsPagePlugin/shop/page/show.html.twig" repository: method: findOneEnabledAndPublishedBySlugAndChannelCode arguments: - $slug - "expr:service('sylius.context.locale').getLocaleCode()" - "expr:service('sylius.context.channel').getChannel().getCode()" - "expr:service('monsieurbiz.cms_page.datetime_provider').now()" condition: "not(context.getPathInfo() matches '`^%sylius.security.api_route%`') and service('monsieurbiz.cms_page.route_checker').checkPageSlug(request)"
Migrations
First, please run legacy-versioned migrations by using command :
bin/console doctrine:migrations:migrate
After migration, please create a new diff migration :
bin/console doctrine:migrations:diff
Then run it (if any) :
bin/console doctrine:migrations:migrate
Example of complete CMS Page
Admin grid
Admin form
Create custom elements
You can customize and create custom elements in your page.
In order to do that, you can check the Rich Editor custom element creation
SEO Friendly
You can define for every page the meta title, meta description, meta keywords and meta image.
Troubleshooting
Locale not found
We've added a new LocaleContext (LastChanceLocaleContext) because the locale isn't set in the request when the
condition on the route is applied.
Therefore, if you still have an issue with multiple locales in your project, you may need to add another LocaleContext
in order to find out your locale. The system will take care of the rest.
Contributing
You can open an issue or a Pull Request if you want! 😘
Thank you!
monsieurbiz/sylius-cms-page-plugin 适用场景与选型建议
monsieurbiz/sylius-cms-page-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 132.35k 次下载、GitHub Stars 达 43, 最近一次更新时间为 2020 年 04 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sylius」 「sylius-plugin」 「monsieurbiz」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 monsieurbiz/sylius-cms-page-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 monsieurbiz/sylius-cms-page-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 monsieurbiz/sylius-cms-page-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Implementation of the Omnibus Directive for Sylius application.
A simple plugin to have sales reports in Sylius
Adds a simple message on top of your shop.
Bulk export of sylius resources
Sylius plugin that integrates Addwish
Setono example plugin for Sylius.
统计信息
- 总下载量: 132.35k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 43
- 点击次数: 26
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-01



