This module provides a new selection handler for Entityreference that allows you to use different views for generating options, based on context.

That way you can EASILY show totally different options in widget per role, content type, language and MANY more!

Possible use cases:

  • Admin wants to see more fields in widget than others?
  • Maybe some entity properties are too computationally expensive for showing them to other users in widget?
  • Maybe you want to implement workflow which implies restricting users ability of creating references? For example - let them reference only content that is "current" - with whenever exceptions from this restriction you want (for moderation/administration purposes).
  • Maybe you want to block specific users from creating references based on some complex rules?

In conclusion: This module can be especially useful in complex projects, which are more specialized applications than simple websites, but not only - as it can come handy in many situations.

Known issues:

If you have in your selection handler settings - more than one context that is active at the same time, and have assigned view - you have no influence on which of those views will be used for generating options. It shouldn't matter most of the time and can be resolved with careful contexts setup. In future I will implement a "weight" for every context, to give user more control over this.

REQUIREMENTS

This module requires the following modules:
* Entityreference (https://drupal.org/project/entityreference)
* Views (https://drupal.org/project/views)
* Context (https://drupal.org/project/context)

Project information

Releases