Drupal is a registered trademark of Dries Buytaert

bookmark_field

6 sites Security covered
View on drupal.org

Bookmark Field lets editors assign a stable, human-readable identifier to any piece of content — like private_consent or contact_form — so that content can be reliably referenced, embedded, and linked to without depending on Drupal's internal numeric
IDs.

In Drupal, every node has a numeric ID (e.g. /node/42) that can differ between environments such as development, staging, and production. Bookmark Field solves this by letting you give content a meaningful name that stays consistent everywhere, making it ideal for content that needs to appear in fixed places — hero banners, promotional blocks, legal notices — regardless of where or how the site is deployed.

Features

  • Bookmark field type: A new field type you can add to any content type or entity. Editors assign a unique identifier to content through the standard node edit form.
  • Redirect route: The path /bookmark/redirect/{entity_type}/{bookmark} always redirects to the canonical URL of the bookmarked entity. Query parameters are preserved through the redirect.
  • Block plugin: A Bookmark Block can be placed anywhere in your layout to render a specific node or entity by its bookmark value, with configurable entity type, field name, and view mode.
  • Twig function: Render bookmarked content directly in theme templates using {{ bookmarkFieldRender('node', 'my_bookmark') }}.
  • Views integration: Two argument default plugins allow Views to be driven by a bookmark — either a statically configured value or one extracted dynamically from the current URL path.
  • Token support: Use [bookmark:bookmark_name] tokens in text fields and path patterns to generate URLs pointing to bookmarked content.
  • Access-aware rendering: All rendering paths respect entity access permissions, published status, and translation context before outputting anything.

When and why would you use this module?

  • You have a "Homepage Hero" node that must be embedded the same way across dev, staging, and production — regardless of its node ID in each environment.
  • You want editors to be able to swap which node appears in a fixed layout region without requiring a developer to update configuration.
  • You need a stable, shareable URL like /bookmark/redirect/node/privacy_policy that always resolves to the correct page.
  • You are building a decoupled or headless front-end and want to fetch content by a human-readable key rather than an environment-specific numeric ID.

Post-Installation

After enabling the module, no global configuration page is required. Follow these steps to start using it:

  1. Go to Structure → Content types and choose Manage fields for the content type you want to bookmark.
  2. Add a new field of type Bookmark. A common machine name is field_bookmark.
  3. Edit a node of that content type and fill in the Bookmark field with a unique identifier, for example homepage_hero.
  4. That node is now accessible via /bookmark/redirect/node/homepage_hero, embeddable via the Bookmark Block, renderable in Twig templates, and usable as a Views argument default.

Field storage settings (maximum length, case sensitivity, ASCII-only) are configurable per field instance. To allow editors to set bookmark values, grant the bookmark_field edit bookmark permission to the appropriate roles under People →
Permissions
.

Additional Requirements

  • Core modules: Field and Block — both are included in Drupal core and require no separate installation

No third-party libraries or additional contributed modules are required.

  • Token — Adds a token browser UI that makes it easy to discover and insert [bookmark:*] tokens when editing text fields or path patterns.
  • Pathauto — Use alongside Token to generate automatic URL aliases that reference bookmarked content.

Similar projects

  • UUID Extra — Allows entities to be referenced by their UUID, which is environment-independent by design. UUIDs are automatically assigned and guaranteed unique, but are not human-readable. Bookmark Field prioritises
    editorial usability with meaningful, editor-chosen names.
  • Key Value Field — Stores arbitrary key/value pairs on entities. More generic in scope and does not provide redirect routing, block rendering, or Twig integration out of the box.
  • Named URLs — Focuses on defining named aliases for paths at the site configuration level rather than attaching identifiers to individual content items.

Supporting this Module

The best way to support this module is to contribute back to it:

  • Report bugs and submit patches in the issue queue.
  • Write a review on the project page.
  • Contribute automated tests or improve the documentation.

Community Documentation

Documentation and usage examples are provided in the module's README.md. Community contributions such as blog posts, video walkthroughs, or demo links are very welcome — please share them in the issue queue.

Activity

Total releases
2
First release
Feb 2026
Latest release
2 weeks ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Feb 18, 2026
1.x-dev Dev Feb 18, 2026