I wanted AM for myself, but toolbar.module for other admins. Used this:

function MY_MODULE_menu_page_alter (&$page) {
  global $user;
  if ($user->uid == 1) {
  $page['page_top']['toolbar'] = array(
    '#access' => FALSE,
  );
  }
}

And enabled both AM and toolbar but no AM permissions for other roles. Works perfectly.
Is this a good approach?
Personally I think since toolbar comes default in D7, giving AM permissions should automatically disable toolbar for that role, since its obvious the two cannot coexist, and an admin wouldnt be enabling AM if he didnt want to use it. Makes sense?

Comments

hexabinaer’s picture

Title: Use both toolbar and admin_menu » Disable D7-toolbar for AM users

Makes perfectly sense. Our clients will call the 'duplicate toolbar' a bug, not a feature.
Changed subject to match this feature request.

dave reid’s picture

Maybe http://drupal.org/project/admin_select is a better solution than working around it in admin_menu when there could be x number of possible 'toolbars' enabled on the site...

sun’s picture

Status: Active » Closed (duplicate)