Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Menu Pager

178 sites Security covered Drupal 8–11
View on drupal.org

Menu Pager adds navigation links to your site's menus, allowing users to easily move between pages that are related within the menu structure. It can be configured to consider the entire menu or just a specific section, and offers API and hooks for more advanced customization.

Menu Pager adds a block for each menu that adds previous and next link navigation based on the current page.

It does this by flattening the menu tree to calculate which links should come before and after the menu link corresponding to the current page. This can optionally be restricted to links with the same parent as the active menu link (by default, it uses traverses the entire menu tree).

A port of this module is available for Backdrop CMS

API

Menu Pager provides a simple API for retrieving previous and next links for a given menu item.

$navigation = menu_pager_get_navigation($menu_link);
// $navigation['previous'] and $navigation['next'] will contain the links

There are hooks to ignore certain paths from appearing in menu pagers.

Out-of-the-box support is included to ignore <nolink> and <separator> paths from Special Menu Items and <firstchild> from Menu Firstchild.

Add your own paths with hook_menu_pager_ignore_paths($menu_name) and hook_menu_pager_ignore_paths_alter(&$paths, $menu_name).

Drupal 8 New features

  • Override the templates for next and previous links
  • Custom next and previous label option in block configuration

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
3.0.4 Stable 8–11 Apr 11, 2025