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.
Problem/Motivation
When navbar is of type second level horizontal we want to have an option to show second level navigation on hover and not just on click.
Comment | File | Size | Author |
---|---|---|---|
#7 | show-sub-navigation-on-hover-2935920-7-interdiff.txt | 839 bytes | Berdir |
#7 | show-sub-navigation-on-hover-2935920-7.patch | 7.87 KB | Berdir |
#6 | interdiff-2935920-5-6.txt | 3.29 KB | pivica |
#6 | show-sub-navigation-on-hover-2935920-6.patch | 7.84 KB | pivica |
#5 | show-sub-navigation-on-hover-2935920-5.patch | 6.34 KB | pivica |
Comments
Comment #2
pivica CreditAttribution: pivica at MD Systems GmbH commentedFirst working patch.
Comment #3
Berdircan't you use 0 and 1 as keys so it will be converted to that automatically on save due to config schema (and if you don't have config schema yet than that should be changed)
Comment #4
pivica CreditAttribution: pivica at MD Systems GmbH commentedOkey here is a new version based on feedback from comment 3.
But, no idea why it does not work properly. When I save setting for bs_bootstrap theme for example for onhover Drupal will save a string and not a boolean:
So it stored '0' string instead of boolean false?
Comment #5
pivica CreditAttribution: pivica at MD Systems GmbH commentedAdded form state for onhover select box so it will be displayed only when navbar_type is second level horizontal.
The problem from comment 4 still remains.
Comment #6
pivica CreditAttribution: pivica at MD Systems GmbH commentedIf hovering would be that simple... ;)
Here is a new version with much-improved hover handling with lot of UX improvements. Changes:
Comment #7
BerdirYou're not going to like this. Also, sorry for not spotting this earlier, also had to debug it pretty deep to spot the fairly obvious mistake, you're missing a mapping: at the top.
Comment #8
pivica CreditAttribution: pivica at MD Systems GmbH commentedDamn such a stupid mistake from me...
Great you found it. Committed.