Hi,

When i check "expand all" in block menu configuration, menu is still not expanded (boostrap theme).
Can you check that ?

Thanks a lot

Have a nice day

Comments

devil2005 created an issue. See original summary.

michelledarling’s picture

The menu items in a submenu are there in the HTML after you check "expand all" but Bootstrap hides them with "display:none" until the parent item is clicked. To show them, just add this to your CSS for whichever menu you want to show opened by default.

.dropdown-menu {
   display:block;
}
devil2005’s picture

Status: Active » Closed (won't fix)

Oh ok thanks, i thought it was in the module ;)

markdc’s picture

In case anybody else lands here, the solution is nicely explained in this video for D7: https://www.youtube.com/watch?v=6V4HmwQIT5g

For D8 he posted an explanation in the video description. I'll add it here since nothing on YouTube is forever.

STEPS (For DRUPAL 8):

``````````````````````````````````````````````````````````````````````
- Install and enable the Menu Block module
- Go to Block layout (Structure -} Block Layout), place a "Main navigation" block under "Primary" region
- Under "HTML AND STYLE OPTIONS" - "Theme hook suggestion", replace "main" with "menu_block" (though you can rename any name you like) and save blocks
- Go to \core\modules\system\templates\menu.html.twig and copy this file.
- Go to your sub theme and paste the file inside \templates folder
e.g themes\your_theme_name\templates\menu.html.twig.
- rename this twig file "menu" to "menu--menu_block" (Take note of the two Dashes and Underscore).
e.g themes\your_theme_name\templates\menu--menu_block.html.twig
- Flush caches and done!

Note:
-Basically what happen here is you create a new theme hook suggestion and override the menu.html.twig for menu block you created.
-You can reuse the same theme hook suggestion - "menu_block" as many as you like for other menu blocks you created. They will all pick up from the same "menu--menu_block.html.twig"