Template updates for bootstrap 5 dropdown toggle

Created on 13 July 2021, almost 3 years ago
Updated 3 November 2023, 8 months ago

Problem/Motivation

Bootstrap 5 has changed the syntax for some data toggle attributes, but the bootstrap-barrio templates (at least for the main menu) have not been updated accordingly. As a result, out of the box drop-down menus don't work because they simply don't have the correct data attribute.

Steps to reproduce

  1. Create a main menu with some sub-menus and put that menu in your site (use for top-levels of dropdowns)
  2. Verify that it is rendering using the menu--main.html.twig template from bootstrap barrio theme (use twig debug for that)
  3. Try to click on a top-level menu item that has a submenu and see nothing happen

Proposed resolution

Edit line 58 of menu--main.html.twig in the bootstrap barrio theme's templates/navigation folder, and change "data-toggle" to "data-bs-toggle".

πŸ› Bug report
Status

Closed: works as designed

Version

5.5

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada teknocat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    I still am having this issue with 5.5.14.

    I added a main menu item and added dropdown links to it. Hovering on the parent menu item shows the link but attempting to click on it does nothing. The child menu links are working.

Production build 0.69.0 2024