简体   繁体   中英

Multilevel menu in Laravel Voyager admin panel not working

I am using Voyager admin package in my Laravel app. I tried to make 2 level dropdown menu like this:

Pages

  -page1

  -page2

    -page2A

    -page2B

but it seems that Voyager does not support 2 or more than 2 level menu dropdown. So I searched on the internet and I found only one solution for this on GitHub. This one
I tried to make a change like the above solution but it still it does not work. Anybody had this issue?

Voyager boostrap menu:

{{ menu('main_menu', 'bootstrap') }}

work's only for 2 levels, if you need to go 3 levels deep you might use your own menu layout as mentioned here:

https://voyager.readme.io/docs/menus

you can find all menu layouts inside vendor/tcg/voyager/resources/views/menu

if you use the default one

{{ menu('main_menu', 'default') }}

It should work but without styling.

You can overwrite or create new menu inside /resources/views/vendor/voyager/menu however you call the file (for example my_custom.blade.php you can call that layout using {{ menu('main_menu', 'my_custom') }}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM