Customizing the Admin Toolbar

Last updated on
30 April 2025

The Admin Toolbar was added to core in Drupal 7. In earlier versions of Drupal, there were several modules that added similar administrative interfaces, including the Admin Menu and Admin module. While those modules are also available for Drupal 7, some of the advantages of using the core Admin Toolbar are:

  • Well Supported.  Because it's part of core it is more likely to play nicely with other modules like CiviCRM.
  • Your site matches screenshots and documentation on Drupal.org.  
  • It provides a visual separation of staff navigation from producer, self-service navigation.

The Shortcut bar is the lighter grey toolbar immediately underneath the Admin Toolbar.

Customizing the Admin Toolbar

The first reason to Customize the Admin Toolbar is usability. If you try to add every possible option at the highest level, the Admin Toolbar ends up wrapping and isn't covered by CiviCRM's admin options. If you leave a link to the Admin menu itself http://yoursite.com/admin in the Admin toolbar, al the shortcuts will be one click away.

The logic is to move items that most staff users never see down to Shortcuts and reorder the other menus into the most logical order.

Most Community Media sites make changes to the default Drupal configuration that result in an Admin Toolbar with options similar to this:

People | Projects | Reservations | Shows | Structure | Configuration | Help | CiviCRM

The menu items that appear in the Admin Toolbar are limited to users in a role with permission to use at least one of the menus under a menu at the top level.  These menu options can be renamed, enabled, disabled, added, or reordered by going to Structure > Menu > Management

but doing so will also affect the main Admin menu at http://yoursite.com/admin, so while you can use this approach the following method is preferable.

Hiding items in Admin Toolbar without changing menu structure

The Admin Toolbar will be displayed to some users who don't need to use every link; Dashboard and Appearance are both useful, but it is unlikely anyone other than the site admins would use them.

  1. Install and enable the CSS Injector module
  2. Go to Admin > Configuration > Development > CSS Injector
  3. Click Create a new rule
  4. Give your rule a name, e.g. "Hide Admin Toolbar Menus"
  5. Enter the CSS code to mask the menu items you don't want to display, this example code masks the Structure, Content, Configuration and Reports links respectively.
    .path-admin-structure, .path-admin-content, .path-admin-config, .path-admin-reports{
      display: none;
    }

    Add or subtract links by using the Check Element option or a utility like Firebug in your browser to work out the CSS names for further menu options in the Admin Toolbar, and then adding them before the {. Here are other potentially useful ones to mask:

    • path-admin-dashboard
    • path-admin-appearance
    • path-admin-people
    • path-admin-modules
    • path-admin-config

Moving Menus from the Admin Toolbar to Shortcuts

By default, there are two links in the Shortcut bar: "Add content" and "Find content." To add and edit shortcuts, click the "Edit shortcuts" link on the right of the toolbar.

While each user can customize links in this way, we recommend creating a different set of shortcuts for significant roles on your site, e.g., producers, interns, staff, admins. This way, each role always has easy access to essential links they need without extraneous ones.

For staff, this might look like:

  • HOME
  • Add Class
  • Add Producer
  • Add Project
  • Add Show
  • Make Reservation
  • Reservation Calendar
  • People
  • Register Class Participant
  • Search Contacts

For Admins:

  • Add content
  • Find content
  • Appearance
  • Configuration
  • Content
  • Devel Dashboard
  • Modules
  • Reports
  • Reservations
  • Structure

Configure Shortcut Bars

  1. Go to Administration > Configuration > User interface > Shortcuts
  2. Click Add shortcut set
  3. Name the Shortcut set for the Role it will be for, e.g. "Staff"
  4. Click Add shortcut set, and enter in the info for the new shortcut (see above for suggestions)
  5. Repeat previous step until your have created all desired Shortcuts, then repeat process for other roles
  6. Install and enable the Shortcut per Role module.
  7. Go to Administration > Configuration > User interface > Shortcuts per Role
  8. Link the relevant Role to the relevant Shortcut set via the selection menus.
  9. Click Save Configuration

By default only 7 shortcuts are allowed in the shortcut bar. There are currently two ways to change this; apply this patch or add a line to settings.php

Help improve this page

Page status: Not set

You can: