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.

Supporting organizations: 
Sponsored Development

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • chart icon456 sites report using this module
  • Created by drclaw on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases