Lots of menu blocks can really clutter up the "Miscellaneous" category in Panels, and they would be much more sensibly assigned to the existing "Menus" category.

Members fund testing for the Drupal project. Drupal Association Learn more


jweowu’s picture

Status: Active » Needs review
669 bytes
jweowu’s picture

And here's a copy of #1 which applies cleanly to menu_block 7.x-2.2

jweowu’s picture

That was a straight copy of menu_ctools_block_info() from ctools/plugins/content_types/block/block.inc, and in retrospect the $delta check for primary/secondary links wasn't relevant here, as all menu_block $delta values are numeric.

aendrew’s picture

Needs to be updated for 2.3. Code works, though; I basically copied it in a separate module and it works as intended.

However, if ever this code gets moved upstream, would it be possible to implement it via its own hook instead of just an implementation of hook_ctools_block_info? That way users would be able to override the default values (I.e., category) by writing their own function. See: http://drupal.stackexchange.com/questions/41983/setting-panels-category-...

jweowu’s picture

aendrew: That sounds like a feature request for ctools; you should post it in its issue queue.

JohnAlbin’s picture

Category: bug » feature
Status: Needs review » Closed (works as designed)

Menu block's "menu tree" panes already do appear in the Panels' “Menus" category. See menu_block_menu_tree_content_type_content_types()

jweowu’s picture

Well fourteen months ago they didn't, but that's all good then :)

jweowu’s picture

Status: Closed (works as designed) » Needs review

Ah, no, you've misunderstood.

This patch is for menu_block blocks, not panes.

Ctools provides panes for all defined blocks. This patch makes sure that the panes it defines for menu_block blocks will appear in the Menus category rather than the Miscellaneous category.

jweowu’s picture

Title: Assign menu block panel panes to "Menus" category. » Assign the panel panes for menu block blocks to the "Menus" category.

Apologies; that title was misleading.

JohnAlbin’s picture

Status: Needs review » Fixed

Oh! I see.


Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.