Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Have you ever set up a contextual filter in Views, and needed to change the default argument to "PHP code" to fetch a field from the current node? This module aims to avoid solutions like this:
<?php
// From http://drupal.stackexchange.com/questions/25148/views-and-contextual-filters-with-entity-reference-field
$node=menu_get_object();
return $node->field_event_artistref['und'][0]['target_id'];
?>
When enabled, this module provides a new default argument handler with the label "Field value from current entity". Once selected, you can choose the field to fetch the default value from.
Note that this module has only really been thoroughly tested and used by the author for fetching the following field types:
- Taxonomy reference
- Node reference (using References module)
- User reference (using References module)
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.- Created by nicksanta on , updated
