We are using Menu Attach Block (https://www.drupal.org/project/menu_attach_block) to embed a separate menu as a item in our Admin Menu.

We are actually able to get this to work, with one issue... since $elements[$path]['#children'] is empty for the attached block, the 'expandable' class is never added in theme_admin_menu_links. The JavaScript depends on having 'expandable' present, and the menu does not work correctly without it.

Of course, we're able to use the theme function to accommodate such a change, and this is what we've done. However it's such a minor adjustment, and does not impact anything else with the function, I thought it made sense to submit a patch for review.

I can understand if you'd rather not support this, just let me know. Thanks.

admin_menu-support_menu_attach_block-1.patch910 bytesron_s
Members fund testing for the Drupal project. Drupal Association Learn more


ron_s created an issue.

ron_s’s picture

One additional comment, could also include !empty($elements[$path]['#options']['menu_views']) to accomplish the same for the Menu Views module. However as I said, maybe you'd rather not support these types of options.