Closed (fixed)
Project:
Menu Block
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2012 at 05:50 UTC
Updated:
22 Mar 2013 at 13:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
jweowu commentedComment #2
jweowu commentedAnd here's a copy of #1 which applies cleanly to menu_block 7.x-2.2
Comment #3
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 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 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 commentedWell fourteen months ago they didn't, but that's all good then :)
Comment #8
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 commentedApologies; that title was misleading.
Comment #10
johnalbinOh! I see.
Fixed!