Admin Toolbar

Transforms the default Drupal Toolbar into an improved drop-down menu system, providing fast and full access to all administration links with configurable behavior and optional search functionality.

admin_toolbar
297,547 sites
319
drupal.org

インストール

Drupal 11, 10, 9 v3.6.2
composer require 'drupal/admin_toolbar:^3.6'

概要

Admin Toolbar は、デフォルトの Drupal Toolbar のユーザーエクスペリエンスを大幅に改善する、広く使用されている管理機能強化モジュールです。標準の管理メニューを階層的なドロップダウンメニューシステムに変換し、サイト管理者が複数のクリックや過度のスクロールなしに、すべての管理ページにすばやくアクセスできるようにします。

このモジュールは、Drupal Core の Toolbar 機能と緊密に統合することで、軽量なフットプリントを維持しています。設定可能なスティッキー動作、よりスムーズなメニュー操作のための hoverIntent サポート、ツールバー表示切り替えのキーボードショートカット、調整可能なメニュー深度設定を提供します。モジュールは、キャッシュクリアショートカット、Cron 実行、管理ページ検索用のオートコンプリート検索フィールドなどの追加機能を追加するコンパニオンサブモジュールで拡張できます。

Admin Toolbar は、ワークフロー全体を通じてさまざまな管理ページに頻繁にアクセスするコンテンツ編集者、サイトビルダー、管理者にとって特に価値があり、Drupal 管理インターフェースのナビゲーションに必要な時間を大幅に短縮します。

Features

  • デフォルトの Drupal Toolbar を、クイックナビゲーション用のネストされたサブメニューを持つ階層的なドロップダウンメニューに変換
  • 3つのオプションを持つ設定可能なスティッキー動作:常に表示、スクロールダウン時に非表示でスクロールアップ時に表示、または完全に無効
  • 設定可能なタイムアウト設定により、誤ったメニューアクティベーションを防ぐ、よりスムーズなメニュー操作のための hoverIntent jQuery プラグイン統合
  • ツールバーの表示を切り替えるキーボードショートカット(Alt + p)、localStorage を使用したページロード間での状態の永続化
  • 表示するネストされたメニューレベル数を制御する設定可能な最大メニュー深度(1〜9レベル)
  • 視覚的なカスタマイズのために、ルート名に基づいてメニューリンクに自動的に追加される CSS アイコンクラス
  • アクセシビリティ向上のためにメニュー項目に追加されるリンク説明付き title 属性
  • 設定変更保存時の自動メニュー再構築

Use Cases

Quick Cache Clearing During Development

During theme or module development, use Admin Toolbar Extra Tools to quickly clear specific caches (CSS/JS, Twig, Render, Theme registry) without clearing all caches. Hover over the Drupal icon, navigate to 'Flush all caches', and select the specific cache to clear. This saves significant time compared to clearing all caches.

Rapid Content Type Management

When managing multiple content types, use the dropdown menu to quickly access any content type's settings, field configuration, form display, or view display without navigating through multiple pages. Simply hover over Structure > Content types and select the desired content type and operation.

Finding Administration Pages with Search

Enable Admin Toolbar Search and use Alt+a to quickly focus the search field. Type partial page names like 'perf' to find Performance settings, or 'cron' to find cron-related pages. The autocomplete shows matching pages with their full menu path for context.

Maximizing Screen Real Estate

When editing content or working in full-screen mode, use Alt+p to hide the toolbar completely. A floating button appears in the corner to restore it. The preference persists across page loads, making it ideal for content-focused work sessions.

Managing User Roles and Permissions

Quickly navigate to any user role's edit form or permissions directly from People > Roles dropdown. Each role shows nested links for Edit permissions and Delete (for custom roles), eliminating multiple clicks through the roles listing page.

Running Cron and Updates

Access Run cron and Run updates links directly from the Drupal icon menu without navigating to the Status report. Useful for quick maintenance tasks or after deploying updates.

Tips

  • Enable Admin Toolbar Extra Tools for the full experience with cache clearing, cron, and entity management shortcuts
  • Use the Search feature (Alt+a) to quickly find any administration page without memorizing menu locations
  • Set hoverIntent timeout to 500ms (default) for balanced responsiveness; increase if you frequently accidentally close menus
  • Reduce menu depth to 3 or 4 if you have performance concerns with many nested menu items
  • The toolbar visibility toggle (Alt+p) remembers your preference - useful for content editors who need maximum screen space
  • Admin Toolbar automatically adds CSS classes based on route names, making it easy to add custom icons via CSS
  • Local tasks display in Admin Toolbar Tools shows edit/delete tabs for the current entity in the toolbar for quick access

Technical Details

Admin Pages 3
Admin Toolbar settings /admin/config/user-interface/admin-toolbar

Main configuration page for the Admin Toolbar module. Allows administrators to configure the toolbar's sticky behavior, hoverIntent settings for hover interactions, keyboard shortcuts, and menu depth. Changes take effect immediately after saving and trigger a menu cache rebuild.

Admin Toolbar Tools settings /admin/config/user-interface/admin-toolbar-tools

Configuration page for the Admin Toolbar Extra Tools submodule. Controls the number of entity bundles displayed in menus and whether local tasks (edit/delete tabs) are shown in the toolbar.

Admin Toolbar Search settings /admin/config/user-interface/admin-toolbar-search

Configuration page for the Admin Toolbar Search submodule. Controls the search field display mode and keyboard shortcut availability.

権限 1
Use Admin Toolbar Search

Allows users to see and use the Admin Toolbar Search functionality. Users without this permission will not see the search field in the toolbar.

Hooks 4
hook_toolbar_alter

Alters the toolbar render array to inject Admin Toolbar's pre-render callback and attach necessary JavaScript libraries based on configuration settings.

hook_toolbar

Implements hook_toolbar() to add toolbar items for Admin Toolbar Tools (extra links, local tasks) and Admin Toolbar Search (search field).

hook_entity_insert / hook_entity_update / hook_entity_delete

Triggers menu link rebuilding when entities that affect menu structure are created, updated, or deleted (menus, user roles, views, content type bundles).

hook_preprocess_menu

Used by Admin Toolbar Links Access Filter to hide menu links the current user doesn't have access to view.

Troubleshooting 6
Menu items not appearing or dropdown not working

Clear all caches (Admin > Flush all caches) and ensure JavaScript is not blocked. Check browser console for JavaScript errors. Verify the Toolbar module is enabled.

hoverIntent causing menus to be slow or unresponsive

Try disabling hoverIntent in Admin Toolbar settings or adjusting the timeout value. Lower timeout values (250-500ms) provide snappier response.

Keyboard shortcuts (Alt+p, Alt+a) not working

Check for conflicts with browser extensions, accessibility tools, or other modules. Try disabling the shortcuts in settings if they conflict with essential functionality.

Too many or too few items in dropdown menus

Adjust 'Maximum number of bundle sub-menus to display' in Admin Toolbar Tools settings. Default is 20; increase for sites with many content types or decrease for better performance.

Search not finding all administration pages

Ensure the user has 'Use Admin Toolbar Search' permission. If using Admin Toolbar Tools, extra links are loaded via AJAX on first search - wait for the initial load to complete.

Admin Toolbar Links Access Filter deprecated warnings

This submodule is deprecated for Drupal 10.3+. Uninstall it and rely on core's improved menu access handling instead.

Security Notes 5
  • Admin Toolbar respects Drupal's permission system - users only see menu items they have access to (enhanced when using Links Access Filter submodule)
  • Cache flushing and cron operations require 'administer site configuration' permission
  • CSRF tokens protect all cache flush and cron routes from cross-site request forgery
  • The search endpoint (/admin/admin-toolbar-search) requires 'use admin toolbar search' permission
  • Never grant administration toolbar access to untrusted users as it provides quick access to powerful site operations