Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Menu Link View Count

37 sites No security coverage
View on drupal.org

This module allows you to display dynamic counts on menu links, showing the number of results from a chosen Views display. This is useful for indicating things like unread messages or pending items directly in your navigation.

Allows site builders to add dynamic count indicators to menu links using Views. Configure each menu item to display the current result count from a selected View display.

Common use cases:

  • Unread messages (12)
  • Pending approvals (3)
  • My tasks (7)
  • Any menu link that should reflect a Views-driven “queue” or “inbox” style count

Installation/Configuration

1. Enable the module.
2. Add/edit a menu link
3. In the "View count" section select the View and display you want counted. Optionally set count limit (to cap at 99+, for example).
4. Save the menu link.
5. The menu will render the link title with an appended count indicator.

Views Setup

Be advised that some pagers do not provide the full count of rows from the view, which will also apply to the count that appears in the menu link.

For the pager, use either:

  • If you're planning to use a "count limit" on the menu item, use Display a specified number of items configured to limit to a value higher than the "count limit" expected to be on the menu item.
  • If you're not planning to use a "count limit" on the menu item, use Display all items. For performance considerations, it's recommended to keep this View as "basic" (as few columns, etc.) as possible.

Performance

Menu items with a count applied to them are subject to caching per the View's cache handling. This can cause frequent invalidation of the caching for menus and regions where you're displaying the menus based on the configuration of the view's caching.

One module to consider to mitigate possible performance concerns is Views Custom Cache Tags.

Customization

To customize styling, override CSS in your theme targeting:

  • ul.menu li.has-count > a
  • ul.menu li.has-count > a .count

To customize markup/behavior, hook_menu_link_view_count_alter() in a custom module (or theme) to adjust rendering, classes, count math, or cache/attachments.

Additional Requirements

Views (Drupal core) is required.

Activity

Total releases
4
First release
Jan 2026
Latest release
4 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.0-beta3 Pre-release Feb 24, 2026
1.0.0-beta2 Pre-release Jan 4, 2026
1.0.0-beta1 Pre-release Jan 4, 2026
1.0.x-dev Dev Jan 3, 2026