Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 2.45 KB

README.md

File metadata and controls

75 lines (53 loc) · 2.45 KB

Monsieur Biz logo      Sylius logo
Monsieur Biz is a Sylius Extension Artisan partner

Menu Plugin

Menu Plugin license Tests Status Security Status

This plugins allows you to manage your menus.

Installation

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

Customize your menu

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).

Menu example

Admin form index

Admin form view

Menu front view

The front view is exactly the same as the default one.

Contributing

You can open an issue or a Pull Request if you want! 😘
Thank you!