I am trying to set up a custom admin menu in the sidebar of my Admin Bundle Sonata, but I donβt understand how to do this?
thanks
Djoo
There is no specific configuration in the sidebar navigation bar; it uses the configuration of the dashboard that needs to be generated.
To see this, you must be logged in and the user must have ROLE_SONATA_ADMIN to see the navigation in the sidebar.
https://github.com/antoinemineau/SonataAdminBundle/blob/master/Resources/views/standard_layout.html.twig#L181
A related issue is explained here: https://github.com/sonata-project/SonataAdminBundle/issues/2321#issuecomment-52756483
For people who may be interested, a function has been added to manage the sidebar menu items (add or remove some of them) dynamically .
This means that you can easily have a state-based sidebar (that is, display a different sidebar depending on (for example) the role of the authenticated user).
The function is to listen to the EventListener in the custom ConfigureMenuEvent using KnpMenuBundle.
EventListener
See the menu extension (KnpMenu recipe for SonataAdmin documentation) and the corresponding chapter in the KnpMenuBundle official documentation .
Source: https://habr.com/ru/post/1200207/More articles:JS Globalize - download json cldr - jsonHow do microsoft linings really work inside? - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1200204/index.html&usg=ALkJrhjLmPvgX0c4ddmZ6B0fmoEqNMEuTwHTML Large Text with Dotted End - htmlMVVM model and iOS storyboard - design-patternsBuild the line of best fit R - rjQuery-File-Upload mysql select displays all files, not just user files - jqueryHow to add String parameter in Jenkins with optional flag - stringhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1200211/index.html&usg=ALkJrhhXCh0v9M6hMYUSNFO3T3sCYxAeewNSCalendar in Swift - init may return zero, but is optional - swiftAll Articles