How create a menu

First build, it
// namespace App\Menu class MyMenu extends MenuType { /** * {@inheritDoc} */ public function buildMenu(MenuBuilder $builder) { $root = $builder->root(); $root->add('app') ->add('welcome') ->show(/* Your custom condition */) ->icon('uil-apps') ->route('app_welcome') ->matchRoute('app_welcome2'); /* Item will be active if this route is matched */ } /** * {@inheritDoc} */ public function renderMenu(Menu $menu, array $options): string { // render menu using twig template for example } }
That's all ! You can now render it on twig
{{ menu_render('App\Menu\MyMenu') }}

Use your own menu on Admin

The default menu used on Admin is Umbrella\AdminBundle\Menu\BaseAdminMenu

To use your own, you have to specify FQCN menu on config :

umbrella_admin: menu: App\Menu\MyMenu

Customize breadcrumb on admin page

On your admin page view, you can use a twig function to update the breadcrumb.

{% extends "@UmbrellaAdmin/layout.html.twig" %} {# change icon #} {% do admin_breadcrumb().icon('uil-home') %} {# add 'foo' link and 'bar' link #} {% do admin_breadcrumb().add('foo').add('bar') %} {# add 'foo' link (with an url) and 'bar' link #} {% do admin_breadcrumb() .add({ 'label' : 'foo', 'route' : 'app_admin_default_index', 'translation_domain': null }) .add('bar') %} {% block content %} ... {% endblock %}