Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

JumpLinks

21 sites Security covered Drupal 10–11
View on drupal.org

JumpLinks automatically creates tables of contents for any Drupal content by scanning rendered pages for anchor targets. Editors can select which sections to include as navigation links directly within the content editing form, with options for checkboxes or drag-and-drop reordering. The module automatically adjusts the links if the content order changes and can detect stale links that no longer exist on the page.

Automatic table of contents for any Drupal content page

JumpLinks adds a field type that scans your rendered pages for anchor targets and lets editors pick which sections appear as navigation links. No manual ID entry, no JSON blobs, no code changes.

How it works: Add a JumpLinks field to any entity type. On the edit form, the widget renders the page using your site's default theme, finds every element matching the configured XPath selector, and presents them as checkboxes (or draggable rows). Editors check the sections they want. On the frontend, selected links render in page order. Reorder your content and the jump links follow automatically.

Two widget styles, one field type

Editors have different preferences. JumpLinks ships two widgets that work with the same underlying field storage:

Widget Best for How it works Checkboxes Most editors Auto-scans on form load. All available sections shown in page order with checkboxes. Check the ones you want. Done. Drag and Drop Editors who want manual control Click "Scan", pick sections from a dropdown, reorder with tabledrag. Full manual control over selection and order.

Switch between widgets on the Manage form display tab. No data migration needed.

Key features

  • Auto-scan on load: the checkbox widget scans automatically when the edit form opens. No button click required.
  • Stale anchor detection: if a selected section is removed from the page, it appears with a strikethrough and warning icon. Validation warns on save so editors can clean up.
  • Configurable max links: set a per-widget cap (e.g., 6 for a hero component). Checkboxes disable and validation blocks when the limit is reached.
  • Label overrides: each link can have a custom label. Leave it blank to use the auto-detected heading text.
  • Configurable XPath: field instance setting controls which elements are matched. Target sections, divs, headings, elements with a specific class, or any combination.
  • Page-order rendering: links always render in the order their targets appear on the page. Reorder your content and the jump links follow.
  • Entity-agnostic: works on nodes, paragraphs, or any content entity. The extractor walks up paragraph chains to find the root entity.

XPath selector examples

Goal XPath Sections and divs with IDs (default) //section[@id] | //div[@id] Only <section> elements //section[@id] Elements with a marker class //*[contains(@class, "toc-target")][@id] Heading elements //h2[@id] | //h3[@id]

Architecture

JumpLinks uses structured field storage. Each selected link is a field delta with anchor and label columns, not a serialized blob. This means:

  • Standard Drupal field APIs work (Views, REST, JSON:API, migrations)
  • No custom serialization or deserialization
  • Widget switching is seamless: both widgets read and write the same schema


For developers: integration patterns

The simplest integration is to show the field with the included JumpLinks Navigation formatter. It renders an accessible <nav> with an ordered list of anchor links.

For deeper integration (e.g., injecting links into a hero component), hide the field in the view display and write a preprocess hook:

function mymodule_preprocess_paragraph__hero(array &$variables): void {
  $paragraph = $variables['paragraph'];
  $field = $paragraph->get('field_jump_links');
  // Read $item->anchor and $item->label from each field item.
  // Call jumplinks.anchor_extractor to get page-order anchors.
  // Map to your component's variables.
}

The jumplinks.anchor_extractor service accepts any ContentEntityInterface. It renders the entity using the site's default theme, then parses the HTML with the provided XPath query. A static re-entrance guard prevents infinite loops when rendering triggers hooks that call the extractor.

Requirements

  • Drupal 10.3+ or 11.x
  • PHP 8.1+
  • No JavaScript dependencies. No external services.

Installation

composer require drupal/jumplinks
drush en jumplinks

Similar projects

  • TOC API: filter-based, scans body field HTML for headings. JumpLinks differs in that it works at the field level across any rendered entity (paragraphs, layout builder, etc.) and gives editors explicit control over which sections appear.
  • Anchor Link: CKEditor plugin for inserting anchor links. Complementary to JumpLinks. Anchor Link helps create the targets, JumpLinks helps navigate to them.

Depends on

Dependencies of the latest stable release

  • field Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Aug 2026
Latest release
1 month ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.4 Stable 10–11 Aug 24, 2026
1.0.3 Stable 10–11 Aug 24, 2026
1.0.2 Stable 10–11 Aug 22, 2026
1.0.1 Stable 10–11 Aug 21, 2026
1.0.0 Stable 10–11 Aug 21, 2026