maximehuran / SyliusMenuPlugin

Manage all your menus in one place, on Sylius.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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!

About

Manage all your menus in one place, on Sylius.

License:MIT License


Languages

Language:PHP 78.3%Language:Twig 13.6%Language:Makefile 8.1%