Created
March 26, 2021 10:43
-
-
Save reynadan/16cc55436150140fe989df199485b598 to your computer and use it in GitHub Desktop.
Customize html KnpMenuBundle in Symfony 5.X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN SIDEBAR MENU --> | |
{{ knp_menu_render('main') }} | |
<!-- END SIDEBAR MENU --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
app.menu.builder: | |
class: App\Menu\MenuBuilder | |
arguments: | |
- '@knp_menu.factory' | |
- '@security.authorization_checker' | |
tags: | |
- { name: knp_menu.menu_builder, method: createMainMenu, alias: main } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
twig: | |
paths: | |
- '%kernel.project_dir%/templates' | |
- '%kernel.project_dir%/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment