Context entity field interface preview.

Context Entity Field provides a context condition based on field values in an entity.

This module creates a condition for Context. The condition causes a reaction if an entity (e.g. a node, user, ...) contains a field with a specific value. All field types available in core (number, boolean, text, ...), taxonomy term, node reference and user reference are supported. You can also activate a context when a field has no value.

Requirements

  • Context
  • Chaos tools

F.A.Q.

Q: How do I display a block in a sidebar when the current node contains a specific taxonomy term?

A: Create a new context and add a new condition Entity field, select entity type Node and select the taxonomy term reference field used in your node. Insert the term ID into the value field. Now you can add a new reaction Blocks and add the specified block to the sidebar. Save the context and check if it works.


Q: How do I display a block in a sidebar when no value is specified for a field on the current node?

A: Create a new context and add a new condition Entity field, choose entity type Node and flag Empty field. Add a new reaction Blocks and add the specified block to the sidebar. Save the context.


This module is sponsorized by Agavee G.m.b.H..
Many thanks to zJoriz for the review of documentation.

Project Information

Downloads