This plugins allows you to manage your menus.
composer require monsieurbiz/sylius-menu-plugin
Change your config/bundles.php
file to add the line for the plugin:
<?php
return [
//..
MonsieurBiz\SyliusMenuPlugin\MonsieurBizSyliusMenuPlugin::class => ['all' => true],
];
Then create the config file in config/packages/monsieurbiz_sylius_menu_plugin.yaml
:
imports:
- { resource: "@MonsieurBizSyliusMenuPlugin/Resources/config/config.yaml" }
Finally import the routes in config/routes/monsieurbiz_sylius_menu_plugin.yaml
:
monsieurbiz_menu_admin:
resource: "@MonsieurBizSyliusMenuPlugin/Resources/config/routes/admin.yaml"
prefix: /%sylius_admin.path_name%
Then run it:
bin/console doctrine:migrations:migrate
If you want to customize your menu, like adding an image, do so by overriding the MenuItem entity (more info about overriding entities in the Sylius documentation).
The front view is exactly the same as the default one.
You can open an issue or a Pull Request if you want! 😘
Thank you!