Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since dropdown submenus no longer exist in Bootstrap 3 (http://stackoverflow.com/questions/18023493/bootstrap-3-dropdown-sub-men...), the code for bootstrap_menu_link in ../theme/menu/menu-link.func.php is obsolete.
Comment | File | Size | Author |
---|---|---|---|
#5 | bootstrap-dropdown-sub-menus-2122539-5.patch | 2.02 KB | valkum |
#3 | bootstrap-dropdown-sub-menus-2122539-3.patch | 1.98 KB | ShaunDychko |
Comments
Comment #1
el7cosmosNot just the class then, submenu shouldn't be rendered also
Comment #1.0
el7cosmosedit.
Comment #2
el7cosmosComment #3
ShaunDychko CreditAttribution: ShaunDychko commentedThanks el7cosmos, that works! I also removed the data-target attribute since that's also obsolete.
Comment #4
valkum CreditAttribution: valkum commentedwe should move depth == 1 further down. Because of the navbar module exclusion.
data-target should be set i think. See comment above the data-target line.
Comment #5
valkum CreditAttribution: valkum commentedWhat do you think about this patch?
Comment #6
el7cosmosThats nice @valkum
I'll go with #5, and yes, data-target should be set
Comment #7
markhalliwellThanks @valkum!
Committed a8cefe4 to 7.x-3.x:
Comment #9
drummRemoving issue summary for #2097987: remove the summary field from issues.
Comment #10
hkirsman CreditAttribution: hkirsman commentedSo could somebody explain why Bootstrap still has submenus: http://getbootstrap.com/components/#navbar-default ?
Comment #11
hkirsman CreditAttribution: hkirsman commentedJust asked the Bootstrap guys and there is 1 level submenu:
https://github.com/twbs/bootstrap/issues/14944
Just that nesting does not work.
Comment #12
cdonner CreditAttribution: cdonner commentedI believe it has been shown that this issues was caused by a semantic misunderstanding and that submenus still exist in Bootstrap, albeit only one level down from the nav bar. Is there a plan to restore this functionality in the Drupal theme?
Comment #13
markhalliwellThis issue was about removing the
.dropdown-submenu
support (see the patch). It did not take out dropdown menu from the main nav links at all.Top level menu item
.nav li a
-- Dropdown menu item
.nav li .dropdown li a
---- Sub menu item
.nav li .dropdown li .dropdown-submenu li a
(this is what was removed in BS3)This project attempts to keep parity with the BS framework. So no, not unless BS itself decides to put them back in. This is, however, very unlikely to happen:
The link in the issue summary (http://stackoverflow.com/a/18024991/1226717), provides examples for how to accomplish this manually in your sub-theme. Furthermore, one can easily reverse engineer the patch in #5 to restore the previous functionality if necessary.
Comment #14
murthi9772 CreditAttribution: murthi9772 commented-
Comment #15
murthi.karuppan CreditAttribution: murthi.karuppan as a volunteer and commented.
Comment #16
murthi.karuppan CreditAttribution: murthi.karuppan as a volunteer and commentedNote: Replace all
THEMENAME
implementations with the machine name of your sub-theme.jquery.smartmenus.bootstrap.css
to./THEMENAME/css/jquery.smartmenus.bootstrap.css
.jquery.smartmenus.js
to./THEMENAME/js/jquery.smartmenus.js
.jquery.smartmenus.bootstrap.js
to./THEMENAME/js/jquery.smartmenus.bootstrap.js
.THEMENAME.info
file:template.php
file (or dedicated./THEMENAME/templates/menu/menu-link.func.php
file) add the following code: http://pastebin.com/2N3m5FBp*edited for brevity and clearer instructions
Comment #17
markhalliwell@murthi.karuppan, please stop spamming all three issues with super long and unnecessarily verbose posts.