1

Let's say I have a menu which is structured like this:

-- About (href="/about")
----- Company (href="/about/company")
----- History (href="/about/history")
-- Offer (href="/offer")
-- News (href="/news")
-- Contact (href="/contact")

So the 'Company' and 'History' are children of the 'About' element. Now, Bootstrap automatically creates the dropdown and if I want to visit 'About' and click it, it only opens the dropdown containing the children. So I can't actually visit 'About' from the menu. How can I force the Bootstrap theme to prevent this behavior?

Any idea how to do this?

2

it took me ages but if you go to menu-link.func.php and take out line 33 $element['#localized_options']['attributes']['data-toggle'] = 'dropdown';

works!!! took me like 3 weeks of reading :)

0

You can also add a jQuery script to remove the href tab and disable the link.

$('#mainlink a').removeAttr('href');
$('#mainlink a').addClass('disabled');

Just to add another case scenario sometimes the drop-down is only offered on the sibling pages. On a Drupal 8 site you need to go into the parent menu item and enable the - Show as expanded (all languages)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.