Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Charts 5.2.4 Minor update available for module charts (5.2.4). Release: Tagify 2.0.3 Minor update available for module tagify (2.0.3). Release: Tagify 1.2.54 Minor update available for module tagify (1.2.54). Release: ECA: Event - Condition - Action 3.1.8 Minor update available for module eca (3.1.8). Release: GoogleTag Manager 2.0.5 Minor update available for module gtm (2.0.5). Release: GoogleTag Manager 2.0.4 Minor update available for module gtm (2.0.4). Release: X-Frame-Options Allow-From webvisor.com 2.0.4 Minor update available for module xframe_allow_webvisor (2.0.4). Release: Commerce ML Starter 2.0.5 Minor update available for module cmlstarter (2.0.5). Usage Milestone: Easy Email Module easy_email crossed 10,000 active installs. Security Coverage: Menu Link By Default Module menu_link_by_default now has official Drupal security advisory coverage.

This module allows you to create more specific content tokens that only apply to certain content types or bundles. This prevents tokens from incorrectly populating fields when content from different types is present, for example, ensuring contact information is only pulled from the correct entity type. It improves token selection by filtering options based on the bundle.

Scope entity tokens by bundle so the token only gets replaced if the bundle matches. This module gives you entity tokens, such as [node:field_example], scoped by bundle (called content type in the case of nodes) so that you can use a more specific token. The equivalent, targeted token for an article would be [bset-node-article:field_example]. Other than this scoping, it works identically to a regular entity token.

Features

The motivation to build this module came from the need to distinguish between content of different types provided to FillPDF module, which allows PDF fields to be filled from replacing tokens with values sourced from multiple entities— including entities of a different type. In situations where both a household node and a property node were provided, everything worked as expected: Contact fields were filled from the household and some additional context came from the property. Where only the property node was present, contact information for the property incorrectly was filled in where only household information should be. Hence the need to limit the token used for household fields to households only.

This module can also improve people's experience of selecting tokens with Drupal's token browser by restricting field tokens to the ones applicable to a particular bundle, provided they start with "Bundle-scoped Page Nodes [bset-node-page]" or similar instead of "Nodes [node]".

Post-Installation

Enable the module and go to an interface with a token browser to insert your bundle-scoped tokens.

Note: Some

Additional Requirements

Token module only.

This module would become even more useful to sitebuilders if token module would pass in some additional information, namely bundle in addition to entity type, that it does not presently support. A module which supports token replacement could, where it calls for the "Available tokens" browser, choose to depend on this module and set the token types solicited to only the applicable bundle or bundles, and not regular node tokens at all.

Similar projects

None known.

Supporting this Module

You can support Agaric's overall contributions to Drupal and a bit beyond by supporting Drutopia at opencollective.com/drutopia. Thanks!!

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
Jun 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.x-dev Dev 10–11 Jun 16, 2026