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.
Useful for when you need the a menu to be split into columns.
What this patch does is add a configuration option to split the menu a certain number of times, then the top-level menu items will be divided into that number of menus when the menu is rendered.
Comment | File | Size | Author |
---|---|---|---|
#4 | split-990892-4.patch | 3.94 KB | Melissamcewen |
#3 | 0001-990892-Split-a-top-level-menu-an-arbitrary-number-of.patch | 4.44 KB | Scott Robertson |
split_menus.patch | 6.15 KB | KarlShea | |
Comments
Comment #1
KarlSheaComment #2
jday CreditAttribution: jday commentedthis would be great for D7 too
Comment #3
Scott Robertson CreditAttribution: Scott Robertson commentedI've attached a Drupal 7 patch for this functionality.
I removed the "split" checkbox from the original patch and just kept the textbox element on the menu block admin form, which defaults to a value of 1. This removes the need to have any additional JavaScript for hiding/showing the textbox, as well as some additional PHP logic. I don't feel that removing the checkbox has any affect on usability.
Comment #4
Melissamcewen CreditAttribution: Melissamcewen commentedThanks Scott, I am using your code and have updated the patch to function with the latest dev version