Entity Context

Component ID

2508585

Component name

Entity Context

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

11840

Component created

Component changed

Component body

This module integrates with the Acquia Lift suite and provides functionality allowing mapping of the "current" entity's fields/properties to UDF fields on the Acquia Lift Profiles page.

The configuration page at admin/config/content/personalize/entity_context allows you to create new contexts by drilling down from an entity type to an individual field or property in either a specific or all bundles (within the chosen entity type). After creating a new context, that context can be assigned to a UDF field on admin/config/content/personalize/acquia_lift_profiles; that context's value will be populated into the UDF field in Lift requests. In cases of multi-value fields, the values will be concatenated into a comma-separated string.

The following field types are currently supported (and support for others can be added by implementing hook_entity_context_field_types()): boolean, date, entityreference, integer, list_boolean, list_integer, list_text, text, text_formatted, text_long, text_with_summary, token, user, uri.

The "current" entity is defined as whatever is returned by menu_get_object(). This will usually be the node, user, or taxonomy term that you're viewing.

If you use an entityreference field, you'll be able to further drill down to the referenced entity type/bundle and choose its own property/field as the final value for the context. Note that recursing down (ie. entityreference field -> entity -> entityreference field -> entity -> field) is not currently supported, and the chosen entityreference field must only allow for entities from a single bundle (if entities from multiple bundles are allowed for the entityreference field, the entity_context module will attempt to work with the first selected bundle).