- Issue created by @Thomas Kaisuka
- 🇮🇳India ravi kant Jaipur
@Thomas Kaisuka
Are you using https://www.drupal.org/project/bootstrap5 → This module doesn't work for my theme, either (Notech, purchased from Themeforest). After a lot of fiddling and no joy, I've uninstalled it. A shame.
- 🇮🇳India ravi kant Jaipur
The menu attributes also not adding for me in Olivero theme. I am using Drupal 10.2.3.
- 🇮🇳India Rajan Kumar@2026
Hi @Thomas Kaisuka
This is work for me you may be change bootstrap5 version hare attached screnshot
- 🇱🇹Lithuania vibrasphere
The module doesn't work with main navigation that ships with Drupal installation and using the bootstrap5 sub-theme, but it does work with custom created menus. Link classes apply for my custom menus, but not for main navigation.
Working alternative https://www.drupal.org/project/link_attributes →
Also the parent ul class gets renamed from .nav to .menu with menus_attribute, but stays .nav with link_attributes (all tested on bootstrap5 sub-theme)
- 🇺🇬Uganda Thomas Kaisuka
This sounds like the viable option for the Boostrasp 5 subtheme https://www.drupal.org/project/link_attributes → .
Problem solved for me now.
- 🇺🇸United States dmudie
I found that I needed an "is-active" class on links (the anchor) for Bootstrap 5 if the item (the list item) is in the active trail. I achieved this in a custom template for the menu like so:
{% if item.in_active_trail %} {{ link(item.title, item.url, menu_attributes|merge({'class': 'is-active'})) }} {% else %} {{ link(item.title, item.url, menu_attributes) }} {% endif %}
Just adding this comment here in case it helps someone.
- 🇪🇸Spain xiaoo Spain
#9 patch don't work in Bootstrap5 and Drupal 10.3.6 (php 8.3.12)
- First commit to issue fork.
- 🇺🇸United States markie Albuquerque, NM
The MR is missing a lot of stuff from the other patches. Please update.
- 🇮🇳India shivam_tiwari
@markie can you please check again? On patch related to comment #12 there are changes related to formatting. I ignored them and only created MR pertaining to changes.
- 🇮🇳India Tirupati_Singh
Hi all, I've applied the provided MR as a patch and it applied cleanly without any errors. However, after applying the patch the issue does not get resolved as the menu attributes are not added to the menu item. Additionally, the added attributes value are being added to link attribute instead of being added to its individual attributes. I'm attaching screenshots of the before and after fixes along with the menu item configuration for the attributes. Hence, moving the issue to NW state.
Thanks!
- 🇺🇬Uganda Thomas Kaisuka
I can confirm none of the patches works @tirupati_singh
- 🇮🇳India shivam_tiwari
@tirupati_singh @thomas kaisuka Thanks for review.
I updated twig template. Please check when you are available! - 🇮🇳India Tirupati_Singh
Hi @shivam_tiwari, I can confirm that after applying the latest MR's changes as a patch the mentioned issues in the comment #19 has been fixed and it is working fine. I'm attaching the screenshot of after fixes for reference hence moving the issue status to RTBC. Thanks for the quick fixes.
Thanks!