Saved Query

Categories

Component ID

2867869

Component name

Saved Query

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Saved Query Fields are meant to serve as enhancements to an existing Entity Reference field. Each Saved Query Field points to a matching Entity Reference field, and contains the sort and condition data necessary to construct an EntityQuery. At regular intervals, the query will be run, the matching items will be placed into the Entity Reference field, and the entity will be saved.

Why is that useful? Often, editors want full control over the contents and arrangement of "Related Articles" and similar recirculation/promotional links for content. However, they also want those lists to be automatically populated if they don't have time to handle them manually. Saved Query Field allows a standard Entity Reference field to be used for full control, while automatic updates keep the content up to date if editors don't intervene.

SQF is still under development. It includes two widgets: a "Raw" widget that allows the query conditions to be entered in YML format, and an "Example" widget that demonstrates how site and use-case-specific widgets can easily provide custom editing interfaces for the Entity Reference population rules.