Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | ctools_block_info-1420180-3.patch | 546 bytes | jweowu |
#3 | ctools_block_info_for_2.2-1420180-3.patch | 514 bytes | jweowu |
#2 | ctools_block_info_for_2.2-1420180-2.patch | 607 bytes | jweowu |
#1 | ctools_block_info-1420180.patch | 669 bytes | jweowu |
Comments
Comment #1
jweowu CreditAttribution: jweowu commentedComment #2
jweowu CreditAttribution: jweowu commentedAnd here's a copy of #1 which applies cleanly to menu_block 7.x-2.2
Comment #3
jweowu CreditAttribution: jweowu commentedThat 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.
Comment #4
aendra CreditAttribution: aendra commentedNeeds 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-...
Comment #5
jweowu CreditAttribution: jweowu commentedaendrew: That sounds like a feature request for ctools; you should post it in its issue queue.
Comment #6
JohnAlbinMenu block's "menu tree" panes already do appear in the Panels' “Menus" category. See menu_block_menu_tree_content_type_content_types()
Comment #7
jweowu CreditAttribution: jweowu commentedWell fourteen months ago they didn't, but that's all good then :)
Comment #8
jweowu CreditAttribution: jweowu commentedAh, 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.
Comment #9
jweowu CreditAttribution: jweowu commentedApologies; that title was misleading.
Comment #10
JohnAlbinOh! I see.
Fixed!