Sylius Version | PHP Version |
---|---|
1.12 | 8.2 |
1.13 | 8.2 |
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-block-plugin
Change your config/bundles.php
file to add the line for the plugin :
<?php
return [
//..
MonsieurBiz\SyliusCmsBlockPlugin\MonsieurBizSyliusCmsBlockPlugin::class => ['all' => true],
];
Then create the config file in config/packages/monsieurbiz_sylius_cms_block_plugin.yaml
:
imports:
resource: '@MonsieurBizSyliusCmsBlockPlugin/Resources/config/config.yaml'
Finally import the routes in config/routes/monsieurbiz_sylius_cms_block_plugin.yaml
:
imports:
resource: '@MonsieurBizSyliusCmsBlockPlugin/Resources/config/routes.yaml'
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
Manage your block in admin
Manage the content of your block, you can decide to disable or enable it to display it anywhere you used it.
For example in your Homepage ou CMS Page !
By using block
element in your Rich Editor.
Chose the block you want to include in your content.
You can use it in multiple places, it will shown the same content everywhere.
If you disable the block, it will not be displayed anymore.
This plugin is under the MIT license. Please see the LICENSE file for more information.