Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Block Layout Accordion 1.0.2 Minor update available for module block_layout_accordion (1.0.2). Release: Canvas interactive toggle 1.0.2 Minor update available for module canvas_interactive_toggle (1.0.2). Release: Views HTTP Client 1.0.2 Minor update available for module views_http_client (1.0.2). Release: Block Layout Accordion 1.0.1 Minor update available for module block_layout_accordion (1.0.1). Release: Canvas interactive toggle 1.0.1 Minor update available for module canvas_interactive_toggle (1.0.1). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Release: Audit Trail 1.0.0-alpha7 New alpha version released for module audit_trail (1.0.0-alpha7). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module creates a Views argument plugin that uses the value of an entity reference field from the current taxonomy term. This allows you to easily create contextual Views that filter content based on a related entity associated with the viewed term.

This Drupal 10 module provides a Views argument default plugin that allows you to retrieve the value of an entity reference field from the taxonomy term currently being viewed. This is particularly useful for creating contextual Views that filter terms based on a related entity associated with the current term.

Purpose

When building Views in Drupal, you often need to filter results based on the context of the current page. If you are on a taxonomy term page and that taxonomy term has an entity reference field (e.g., referencing a specific content type, user, or another taxonomy term), this module enables you to use the value of that entity reference field as a default argument for a Views contextual filter.

Usage Example

Let's say you have a taxonomy vocabulary called "Product Categories" and each category term has an entity reference field named `field_featured_product` that references a "Product" content type. You want to display a list of "Featured Products" related to the current category when a user visits a "Product Category" taxonomy term page.

Here's how you can achieve this using the VTERCF module:

  1. 1. **Ensure that your Taxonomy term has en Entity Reference Field**
  2. 2. **Create a View:**
    * Go to `Structure > Views > Add new view`.
    * Select Taxonomy Term in Show Views Options.
  3. 3. **Add a Contextual Filter:**
    * In your View, under the "Advanced" section, click "Add" next to "Contextual filters".
    * Select the entity reference you want to use to filter the list of terms.
    * **Crucially, configure this contextual filter as follows:**
    * When the filter value is NOT available: Select "Provide default value".
    * From the "Type" dropdown, choose **"Entity reference field from current term"**.
    * In the "Entity reference field name" text box, enter the machine name of the entity reference field on your
    *taxonomy term* (e.g., `field_featured_product`).
    * Apply (and save) your View.

Now, when you visit a "Product Category" taxonomy term page (e.g., `/taxonomy/term/123`), the View will automatically use the value from the `field_featured_product` on that specific taxonomy term to filter and display the corresponding featured products.

Depends on

Dependencies of the latest stable release

  • taxonomy Drupal core
  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jun 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 4
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.3 Stable 10–11 Jul 1, 2025
1.0.2 Stable 10–11 Jun 28, 2025
1.0.1 Stable Jun 28, 2025
1.0.0 Stable Jun 28, 2025