Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views: Media taxonomy filter

No security coverage Under active development 121 sites

This module adds a new filter to Views, allowing you to filter media items by their taxonomy terms, including sub-terms. It provides the functionality of the "Content has taxonomy term ID (with depth)" filter directly for media entities.

This lightweight module is trying to solve the problem that Views filter named "Content has taxonomy term ID (with depth)" is available only for nodes and can not be used for media entities.

Related issue in Drupal Core : Views should support - Entity: Has taxonomy term ID (with depth) - for entities

The Module extends Taxonomy module from Drupal core and provides a new filter "Media has taxonomy term ID (with depth)".

Compared to the Taxonomy module that uses relationship table "taxonomy_index" between terms and nodes, this module uses only SQL query on existing tables. Module needs to know the name of your reference field. You must specify the field in the filter settings.

How to use

  1. Go to your Media Views -> Advanced -> Contextual filters -> Add -> Media has taxonomy term ID (with depth)
  2. In Reference field: Enter a machine name of the field in the media entity type, which is referencing to a taxonomy

Most of this module code comes from Commerce: Product taxonomy filter. A big thanks to this project maintainers.

8.x-1.x vs 8.x-2.x

Drupal core 8.6 introduces modifications in taxonomy table in database.
Use 8.x-2.x version of this module if your drupal core version is >= 8.6

Ask your assistant about Views: Media taxonomy filter

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

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
3
Tracked since
Jan 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.0.0-beta2 Pre-release 9–11 Aug 20, 2025
3.0.0-beta1 Pre-release 9–10 Jan 4, 2024
3.0.x-dev Dev 9–11 Jan 4, 2024