monsieurbiz / sylius-homepage-plugin
Add a homepage management to your Sylius using the Rich Editor.
Installs: 39 824
Dependents: 1
Suggesters: 0
Security: 0
Stars: 11
Watchers: 8
Forks: 12
Open Issues: 1
Type:sylius-plugin
Requires
- php: ^8.0
- monsieurbiz/sylius-media-manager-plugin: ^1.1
- monsieurbiz/sylius-plus-adapter-plugin: ^1.1
- monsieurbiz/sylius-rich-editor-plugin: ^2.8
- sylius/sylius: >=1.11 <1.14
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.16
- phpmd/phpmd: ^2.15
- phpspec/phpspec: ^7.0
- phpstan/phpstan: ^1.8.4
- phpstan/phpstan-doctrine: ^1.3.2
- phpstan/phpstan-webmozart-assert: ^1.1
- phpunit/phpunit: ^10.5
This package is auto-updated.
Last update: 2025-01-03 15:36:20 UTC
README
Sylius Homepages
This plugins allows you to manage your homepages using the Rich Editor.
If you want to know more about our editor, see the Rich Editor Repository
Compatibility
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-homepage-plugin
If you do not use the recipes :
Change your config/bundles.php
file to add the line for the plugin :
<?php return [ //.. MonsieurBiz\SyliusHomepagePlugin\MonsieurBizSyliusHomepagePlugin::class => ['all' => true], ];
Then create the config file in config/packages/monsieurbiz_sylius_homepage_plugin.yaml
:
imports: - { resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/config.yaml" }
Finally import the routes in config/routes/monsieurbiz_sylius_homepage_plugin.yaml
:
monsieurbiz_sylius_homepage_admin: resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/routes/admin.yaml" prefix: /%sylius_admin.path_name% monsieurbiz_sylius_homepage_homepage: path: /{_locale}/ methods: [GET] requirements: _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ defaults: _controller: monsieurbiz_homepage.controller.homepage::indexAction _sylius: template: '@MonsieurBizSyliusHomepagePlugin/Homepage/index.html.twig' repository: method: findOneByChannelAndLocale arguments: - "expr:service('sylius.context.channel').getChannel()" - "expr:service('sylius.context.locale').getLocaleCode()"
Migrations
Make a doctrine migration diff :
bin/console doctrine:migrations:diff
Then run it :
bin/console doctrine:migrations:migrate
Example of complete homepage
Admin form with preview
Front display
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 your homepage the meta title, meta description and meta keywords.
Contributing
You can open an issue or a Pull Request if you want! 😘
Thank you!