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.
How would I limit the navigation/main-menu to display the top level only, without sub-navigation?
Comment | File | Size | Author |
---|---|---|---|
#2 | responsive-menus.jpg | 40.89 KB | lastar84 |
Comments
Comment #1
devsaran CreditAttribution: devsaran commentedTo make navigation/main-menu to display the top level only, make sure you have disabled Show as expanded for every parent menu
Comment #2
lastar84 CreditAttribution: lastar84 commentedI have disabled "Show as expanded" for the parent menu items.
It works, unless the active page has children. Then children are displayed on hover in the 960 menu, and they are displayed in the link selections on the responsive-width menus. See attached...
I also tried changing the superfish.js pathLevels to 0, but that didn't stop the children from showing.
I can manually disable every child menu item, but this would not be useful for websites with hundreds of pages or with content that is managed by users who aren't Drupal experts.
Comment #3
lastar84 CreditAttribution: lastar84 commentedNot sure why this is closed and marked as duplicate. It isn't a duplicate of anything.