$items['admin/settings/menu_block'] = array(
    'title' => 'Menu block',
    'description' => 'Add a new menu block.',
    'access arguments' => array('administer blocks'),
    'page callback' => '_menu_block_by_module_hack', // And, I mean hack.
    'file' => 'menu_block.pages.inc',
  );

Can we remove that hack please? I'll post a patch if you agree.

Comments

JohnAlbin’s picture

Sure, but the purpose of the hack is this:

/**
 * This page is simply to make Menu block visible on admin pages.
 *
 * In Drupal 6, the admin/by-module page won't display Menu block's help link
 * because it doesn't have any non-tab menu links. So to allow Menu block to
 * have some "visibility" in the admin pages, we add a fake-ish page to
 * admin/settings/menu_block that redirects to the "Add menu block" tab.
 */
function _menu_block_by_module_hack() {
  drupal_goto('admin/build/block/add-menu-block', NULL, NULL, 301);
}

I only really want the help link the admin/by-module page. The admin/settings/menu_block page is just a means to get that.

[edit: So, yes, we can remove it if you know of a way to get the "help" link to appear on admin/by-module. The problem is that Menu block integrates so well with the existing Drupal core functionality that, without reading some documentation, you may not know where to go to get at its functionality. ]

sun’s picture

If the goal is core, then we have to remove that. :)
Another downside of this item is that it needlessly clutters the Administration menu (admin_menu) below Site configuration.

IMHO, it would more than sufficient to mention this a) on the project page and b) in the README.txt.

JohnAlbin’s picture

…if we had a README.txt. :-p

But I agree, the hack should go. Hopefully, the help text on admin/build/block will also orient new users.

JohnAlbin’s picture

Title: Remove settings hack » Replace admin/by-module hack with README.txt
Category: task » feature
Status: Active » Fixed

Fixed. Thanks for the suggestion, Daniel!

Status: Fixed » Closed (fixed)

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