Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Description

This project VERTA (Views Entity Reference Tokens as Arguments) allows to use arguments as Tokens in Entity Reference Views.
Currently, entity references views arguments transmitted to the view are static.
Here, they can be dynamic via tokens.

Installation

Add the module and enable it, that's all.
This module use views hooks to work

Use case

I want a view in my entity reference field which filter results depending of values from a current edited entity.

How to use

1) You must create a view as an Entity Reference display type
2) Prepare the logic of your view
3) You have to configure at least one contextual filter on your view which will receiven the token argument
4) Edit the entity field that will use the view as an entity reference
5) On the field configuration, select Views as arguments
6) Select your view
7) In the arguments parts, write the token you want to use (eg: [node:nid])
8) Done

Warnings

- At the moment, only entity tokens are managed.
- It will be hard to do a preview of the view with a token arguments (In the preview mode, the view don't have an entity edition context)

Supporting organizations: 

Project information

  • Created by Pilulu on , updated