Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Vocabulary Catalog

No security coverage Under active development 5 sites

The Vocabulary Catalog is a configurable block system that displays vocabularies and their terms, including real-time counts for various entity types and multiple layout options. It offers advanced filtering, sorting, AJAX search, and CSV exporting, making it developer-friendly with REST API support.

The Vocabulary Catalog is a taxonomy display suite for Drupal 10 and 11. It provides a highly configurable block system to display vocabularies and their terms with real-time entity reference counts, supporting everything from standard Nodes to Media, Commerce Products, and custom entities.

Key Features

  • Universal Entity Counting: Go beyond nodes. Count references from Media, Commerce, Users, or any entity type using entity_reference fields.
  • Multi-Layout Engine: Switch between Vertical Lists, Responsive Card Grids, Collapsible Accordions, or Horizontal Tabs with a single click.
  • Granular Filtering: Filter counts by specific content bundles (e.g., only count "Article" nodes) and hide terms that fall below a minimum count threshold.
  • Advanced Tree Logic: Support for deep nesting with configurable max-depth limits, weight-based sorting, and alphabetical or count-based ordering.
  • Interactive Toolset: Integrated AJAX live search for instant client-side filtering and one-click CSV exporting for data analysis.
  • Developer Friendly: Full REST API support, comprehensive Twig theme suggestions, and CSS Custom Properties (Variables) for easy styling.

Installation

Install the module via Composer to automatically manage dependencies and library definitions:

composer require drupal/vocabulary_catalog

Enable the module using Drush:

drush en vocabulary_catalog -y

Configuration & Usage

  1. Placement: Navigate to Structure » Block Layout and place the "Vocabulary Catalog" block in your desired region.
  2. Selection: Choose the vocabularies you wish to display. The block supports multiple vocabularies simultaneously.
  3. Entity Settings: Under the Entity Counting tab, select the entity types you want to track. If selecting "Node," you can further refine the count by Content Type.
  4. Permissions: Manage access at People » Permissions:
    • Administer vocabulary catalog: Configure block settings.
    • Export vocabulary catalog: Download CSV data.
    • View unpublished vocabulary catalog terms: Visibility of status = 0 terms.

Architecture & Performance

The module is engineered for high-performance enterprise environments where taxonomy trees can scale to thousands of terms:

  • Smart Cache Invalidation: Uses a sophisticated cache tag system (vocabulary_catalog_counts and taxonomy_term_list:[VID]) to ensure data is only recalculated when terms or referenced entities change.
  • Optimized Queries: Utilizes the taxonomy_index for high-speed node counting, falling back to optimized Entity Queries for non-core entity types like Media or Commerce.
  • Decoupled Ready: The REST API endpoint allows you to pull the entire catalog structure into headless applications (React/Next.js) with clean, markup-free JSON.

Theming & Customization

The module provides granular template suggestions and CSS variables for seamless integration:

  • Twig Templates: Override the base layout using vocabulary-catalog-block--[block-id].html.twig.
  • CSS Variables: Customize the visual identity without writing complex overrides:
    :root {
      --vc-color-primary: #007bff;
      --vc-color-badge-bg: #e9ecef;
      --vc-radius: 8px;
    }

REST API Endpoint

Access the catalog data programmatically via the following route:

GET /api/vocabulary-catalog/{block_id}?vocabularies=tags,categories

The API supports filtering by min_count, max_depth, and sort_by parameters, returning a structured JSON tree of terms and metadata.

Similar Projects

  • Facets: Ideal for search-driven filtering, whereas Vocabulary Catalog is designed for dedicated navigation and landing pages.
  • Taxonomy Menu: Converts vocabularies into Drupal Menu items; our module offers deeper entity-counting logic and modern AJAX filtering.
  • Term Condition: Provides visibility controls, while Vocabulary Catalog focuses on visual presentation.

Support & Contribution

If you encounter bugs, need assistance with complex entity reference setups, or have ideas for new layouts—such as a "Masonry" grid or "Tag Cloud" view—please contribute to the official issue queue.

Drupal 10–11

Ask your assistant about Vocabulary Catalog

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • block Drupal core
  • serialization Drupal core
  • taxonomy Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
May 2023
Latest release
7 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0 Stable 10–11 Feb 20, 2026
2.0.x-dev Dev 10–11 Feb 20, 2026
1.2.2 Stable 8–10 May 27, 2023