The NzoLeftSidebarBundle is a Symfony Bundle used to handle Left SideBare Menu.
$ composer require nzo/left-sidebar-bundle
// config/bundles.php
return [
// ...
Nzo\LeftSidebarBundle\NzoLeftSidebarBundle::class => ['all' => true],
];
# config/packages/nzo_left_sidebar.yaml
nzo_left_sidebar:
menu:
user:
label: Admin Users
route_or_uri: /user # uri href
icon: users
cssClass: bn-danger
role: ROLE_ADMIN
accepted_environment_names: [prod, dev] # optional
article:
label: Articles
route_or_uri: article_index # route name
icon: feather
role: ROLE_USER
children:
article_foo:
label: Foo
route_or_uri: /foo
icon: fa fa-play-circle
role: ROLE_USER
children:
article_foo_bar:
label: bar
route_or_uri: foo/bar
icon: fa fa-video-camera
role: ROLE_USER
It is possible de override the default template:
templates/
└─ bundles/
└─ NzoLeftSidebarBundle/
└─ left-sidebar.html.twig
This bundle is under the MIT license. See the complete license in the bundle:
See LICENSE