A RedHen link would be useful for sites using Admin menu.

Comments

nedjo’s picture

Status: Active » Needs review
StatusFileSize
new572 bytes

Implementation of hook_admin_menu_output_build().

levelos’s picture

Status: Needs review » Needs work

Thanks @nedjo. Know anyway to get this to make the admin menu section to expand? Currently just adds a root /redhen path with no child items.

nedjo’s picture

Status: Needs work » Needs review
StatusFileSize
new1.3 KB

Yep, here's an improved patch. See inline comments for details.

levelos’s picture

Status: Needs review » Fixed

Great patch @nedjo, commited.

Status: Fixed » Closed (fixed)

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

Pete B’s picture

Status: Closed (fixed) » Active

Is there a reason we can't change the menu items to the url admin/redhen ? This way we would get ourselves an entry in the "Management" menu by default and not have the weirdness of building up a menu in navigation and then copying it?

Using this method there is no way for me to change the position of the redhen menu without patching the module.

levelos’s picture

Status: Active » Closed (fixed)

The main reason is that changing the path to /admin/redhen will ruin the breadcrumb path for all items below /redhen. I'd prefer to leave as is.

johnennew’s picture

Status: Closed (fixed) » Needs work

RedHen is administration functionality - it messes up all sorts of bits of Drupal not being under /admin. A good example is that redhen does not use the admin theme.

For anyone else struggling with this, I found the following code helpful:

 /**
   * Implements hook_custom_theme().
   *
   * Make redhen pages use the admin theme rather than standard theme.
   */
  function mymodule_custom_theme() {
    if (arg(0) == 'redhen') {
      return variable_get('admin_theme', NULL);
    }
  }

johnennew’s picture

Or even better, this hook properly describes the redhen paths as admin paths;


/**
   * Implements hook_admin_pages().
   *
   * Make redhen pages use the admin theme rather than standard theme.
   */
  function mymodule_admin_paths() {
  
    $paths = array(
      'redhen' => TRUE,
      'redhen/*' => TRUE,
    );
  
    return $paths;
  }

nedjo’s picture

Status: Needs work » Closed (fixed)

  • Commit e63221c on 7.x-1.x, tests, redhen-donation authored by nedjo, committed by levelos:
    #1679786 by nedjo: Add RedHen to admin menu.
    

  • Commit e63221c on 7.x-1.x, tests, redhen-donation, relation-roles authored by nedjo, committed by levelos:
    #1679786 by nedjo: Add RedHen to admin menu.