Node Reference Views – Use created/edited node fields as contextual filters

Greetings fellow Drupalers,

How can I use a node’s fields to limit/filter the same node’s node reference field?

For instance, how could one use a date field to filter the view feeding the node reference field options.

I reckon there’s an option to pass some view arguments on the field settings. However, it seems to be static and doesn’t accept any type of tokens.

Any input on this would be highly appreciated!

– Answer –

  • 23 February 2012: Answer by Ashlar for Node Reference Views - Use created/edited node fields as contextual filters -

    A node reference field holds the nid of a specific node assigned to the field. It is the identify of another node and is not dynamic and so cannot be used to further filter a view. You can filter the view using the filters in the first column of the view definition form. The range of filters available can be expanded by providing relationships (3rd column). You can also use information available from the contexts that exists at the time the view is called such as who the user is, taxonomy terms associated with the selected content, or information included in the URL using contextual filters (D7). Mastering views can be quite challenging and I recommend viewing 'Taming the Beast' from nodeone.se

  • 23 February 2012: Node Reference Views - Use created/edited node fields as contextual filters -

    Greetings fellow Drupalers,

    How can I use a node's fields to limit/filter the same node's node reference field?

    For instance, how could one use a date field to filter the view feeding the node reference field options.

    I reckon there's an option to pass some view arguments on the field settings. However, it seems to be static and doesn't accept any type of tokens.

    Any input on this would be highly appreciated!

Leave a Reply