Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides a Views default argument plugin that allows you to use any field value from the current entity on the page as a default value for a contextual filter. This is useful for creating dynamic views, such as displaying similar content based on tags from the current page.

Views default_argument plugin to use values from the current page entity as default values for a contextual filter. Similar what the "Content ID from URL" default value is doing, except you can pull any field value from that content instead of just the ID (but also you're not limited only to nodes, all entity types are supported).

A simple example would be to use the tags from the current page node to feed a "similar content" block. Works for any content entity type as long as the entity is accessible as a route parameter using the entity type id as the route parameter name (i.e. most entity routes).

Installation & Usage

  1. Install as usual, no initial settings to set.
  2. Add a contextual filter to a view display
  3. Select provide default value from the "When the filter is not available" section
  4. Select "Field value from Current Entity"
  5. Select the Entity type and field name to use as the default value
  6. Additionally set options for an empty field fallback & multiple values handling

Similar modules

If you need default_argument from current user.

If you prefer to use tokens to get value you can use one of these.

Activity

Total releases
2
First release
Mar 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Release date
3.x-dev Dev Mar 13, 2025
3.0.0-beta1 Pre-release Mar 13, 2025