Skip to main content
added link to issue
Source Link
aendra
  • 1.8k
  • 20
  • 44

A kinda hacky way of doing it is to hook into hook_ctools_block_info() like so:

/**
 * Implements hook_ctools_block_info().
 *
 * @see ctools_block_content_type_content_types().
 */
function menu_block_ctools_block_info($module, $delta, &$info) {
  if ($info['title'] == 'Sub Menu Menu Block') {
      $info['icon'] = 'icon_core_block_menu.png';
      $info['category'] = t('Page Content');
  }
}

I just dropped this code in a separate module and I'm off to the races. The only problem is if Menu Block decides to implement its own hook_ctools_block_info function (Indeed, I got thisthe above code from a patch that does exactly thata patch that does exactly that), in which case redeclaration errors will show up. I'll leave this question marked as unanswered for the moment; if anyone can think of a better way of accomplishing the above, I'd be happy to accept that answer instead.

A kinda hacky way of doing it is to hook into hook_ctools_block_info() like so:

/**
 * Implements hook_ctools_block_info().
 *
 * @see ctools_block_content_type_content_types().
 */
function menu_block_ctools_block_info($module, $delta, &$info) {
  if ($info['title'] == 'Sub Menu Menu Block') {
      $info['icon'] = 'icon_core_block_menu.png';
      $info['category'] = t('Page Content');
  }
}

I just dropped this code in a separate module and I'm off to the races. The only problem is if Menu Block decides to implement its own hook_ctools_block_info function (Indeed, I got this code from a patch that does exactly that), in which case redeclaration errors will show up. I'll leave this question marked as unanswered for the moment; if anyone can think of a better way of accomplishing the above, I'd be happy to accept that answer instead.

A kinda hacky way of doing it is to hook into hook_ctools_block_info() like so:

/**
 * Implements hook_ctools_block_info().
 *
 * @see ctools_block_content_type_content_types().
 */
function menu_block_ctools_block_info($module, $delta, &$info) {
  if ($info['title'] == 'Sub Menu Menu Block') {
      $info['icon'] = 'icon_core_block_menu.png';
      $info['category'] = t('Page Content');
  }
}

I just dropped this code in a separate module and I'm off to the races. The only problem is if Menu Block decides to implement its own hook_ctools_block_info function (Indeed, I got the above code from a patch that does exactly that), in which case redeclaration errors will show up. I'll leave this question marked as unanswered for the moment; if anyone can think of a better way of accomplishing the above, I'd be happy to accept that answer instead.

Source Link
aendra
  • 1.8k
  • 20
  • 44

A kinda hacky way of doing it is to hook into hook_ctools_block_info() like so:

/**
 * Implements hook_ctools_block_info().
 *
 * @see ctools_block_content_type_content_types().
 */
function menu_block_ctools_block_info($module, $delta, &$info) {
  if ($info['title'] == 'Sub Menu Menu Block') {
      $info['icon'] = 'icon_core_block_menu.png';
      $info['category'] = t('Page Content');
  }
}

I just dropped this code in a separate module and I'm off to the races. The only problem is if Menu Block decides to implement its own hook_ctools_block_info function (Indeed, I got this code from a patch that does exactly that), in which case redeclaration errors will show up. I'll leave this question marked as unanswered for the moment; if anyone can think of a better way of accomplishing the above, I'd be happy to accept that answer instead.