Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

This module allows you to control block visibility based on taxonomy terms. It enables blocks to be displayed on specific taxonomy term pages or on content tagged with particular terms or their descendants.

Vocabulary Condition provides taxonomy-based visibility conditions for blocks. The conditions can be used when configuring visibility rules on the Block Layout page, or anywhere the core condition plugin API is available (for example, with the Context module).

Which version should I use?

The recommended version is 2.x, which goes beyond what Drupal core offers:

  • Vocabulary or term: applies on taxonomy term pages. It matches whole vocabularies (as core does), and additionally specific taxonomy terms, optionally including all of their descendants. Ideal for section-based block placement: blocks assigned to a section keep working automatically when new child terms are created.
  • Content tagged with vocabulary: applies on content pages. It shows a block on every node tagged with a term of the selected vocabularies, with specific terms, or with any of their descendants. Drupal core provides no taxonomy-based block visibility for content pages at all.

Vocabularies and terms are combined with OR, and the conditions collect the proper cache metadata so that changes to the term hierarchy invalidate cached results. The 2.x branch requires Drupal 10.3, 11 or 12.

How it differs from Drupal core

Since Drupal 9.3, core includes the functionality this module originally provided: the generic entity bundle condition exposed for taxonomy terms and the taxonomy term route context. The 2.x branch goes beyond that in two ways:

  • It adds matching by specific taxonomy term, optionally including all of its descendants. This keeps section-based block placement working automatically when new child terms are created, something the core "Vocabulary" condition does not do.
  • It adds taxonomy-based block visibility on content (node) pages, which Drupal core does not provide at all.

If you only need to match whole vocabularies on taxonomy term pages, you do not need this module: use the core "Vocabulary" condition instead.

The 1.x branch is not recommended

The 1.x branch predates the core functionality and is kept only for compatibility with existing sites. It will receive no new features. New installs should use 2.x, or plain Drupal core if the core condition is enough.

Activity

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

Release Timeline

Releases

Version Type Release date
1.0.3 Stable Jul 2, 2026
2.0.1 Stable Jul 2, 2026
2.0.x-dev Dev Jul 2, 2026