Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Facets 3.0.6 Minor update available for module facets (3.0.6). Release: Facets 3.0.5 Minor update available for module facets (3.0.5). Release: Flag 5.1.0 Minor update available for module flag (5.1.0). Release: Random Name 1.2.3 Minor update available for module random_name_chooser (1.2.3). Release: Text with summary 1.0.0 Initial release available for module text_with_summary (1.0.0)! Release: Ágora Transparency Theme 1.0.7 Minor update available for theme agora_theme (1.0.7). Release: Automated Revision Log 1.1.3 Minor update available for module ai_revision_log (1.1.3). Release: Views HTTP Client 1.0.4 Minor update available for module views_http_client (1.0.4). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Module Revived: ЮKassa (YooMoney) для Drupal v7 2.6.1 Module yoomoney_api updated after 7 months of inactivity (2.6.1).

Views Default Argument: Entity Field Values

630 sites Security covered

Part of the Views ecosystem · 207 projects

View on drupal.org

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.

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
2
Tracked since
Mar 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

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