Forum Moderators: open

Message Too Old, No Replies

Bootstrap dropdown menu with linkable parent items

         

bill

2:42 am on Feb 28, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not sure if I'm describing this correctly.

I'm not well versed in Bootstrap, but I have a site being developed in Bootstrap 3. The person helping me is a bit stuck, and so I thought I'd ask here for some advice.

I'm looking for a multilevel drop-down navigation example where the parent elements (that have child and possibly grandchild elements) could be functioning links in addition to being able to expand the elements underneath them.

Menu Ex.

--- Parent 1
--- Parent 2 (link)
------ Child 1
------ Child 2 (link)
--------- Grandchild 1
--------- Grandchild 2
--- Parent 3

Right now I can only find menu examples where a Parent element will only toggle the display of the Child elements of the menu. I would also like that Parent element to function as a link.

I'm not really sure what to search for to look for examples of something like this. The standard Bootstrap examples I've found don't seem able to accomplish this.

Marshall

3:38 am on Feb 28, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I believe (I remember reading some place) that bootstrap dropped support for child menus, though I cannot remember at what version that happened. As for the parent element functioning as a link, I believe that is impossible as it functions as a toggle. Have you considered a mega-menu instead?

NickMNS

4:06 am on Feb 28, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This does not seem possible without customization. I tried quickly with both BS3 and BS4 and in both cases it is not possible to nest the drop-downs.

Side note, if you are developing a new site, you may want to consider developing it in Bootstrap 4 it is currently in alpha-V6 release and beta release is expected very soon.
Here is the link [v4-alpha.getbootstrap.com...]

The navbar is one of the features that has been greatly improved.

bill

6:51 am on Feb 28, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This site started development last year and the client wanted Bootstrap 3 at the time and not the Alpha 4, and unfortunately it's a bit too far along to switch now.

Thanks for confirming about the lack of nested drop-down support in BS3 and BS4. I'm in-between a client and developer here and they were going in opposite directions with this. If I know it's not supported in the framework without customization, then I know how to proceed.