Fetch Dynamic Content with Pinned Queries
Pin a query result onto a Freeform template so a Repeater inside it can iterate over the matches. Like Pinned Entries, but for lists instead of single entries, and the list refreshes automatically as the query's underlying data changes.
Pinned Entry vs. Pinned Query: When to Use Which
| Pinned Entry | Pinned Query | |
|---|---|---|
| What you pin | One specific entry | A query returning N entries |
| Used by | Component bindings | Repeater bindings |
| Updates as content changes | Only if you re-pin | Automatically, the query re-runs |
| Typical use | "This campaign's headline", "this featured product" | "All blog posts in this category", "top 3 products this week" |
A Freeform template often uses both, pin one hero entry for template-level branding, plus a query for the dynamic list below it.
What a "query" means here
A query is a saved CDA query against your stack: a content type + optional filters + optional ordering + a limit. When the template renders, Studio re-runs the query against the current environment and locale, then feeds the results into whichever Repeater is bound to it.
Where to Configure
Right panel → Data tab → Queries section
The Data tab only appears when Enable Freeform Feature is on; without Freeform, the right panel collapses to Settings only. See The Data tab for the full structure.
- Open the Freeform template on the canvas
- Right panel → Data tab → Queries section → + New Query
- Either pick a content type and configure filters/order/limit by hand, or type a natural-language prompt and let Studio convert it into a smart query
- Save the pin
- Drop a Repeater onto the canvas → bind its source to the pinned query
- Drop a card or item component inside the Repeater body. Its bindings resolve against the current iteration item.
Natural-language query prompts
Studio's New Query modal accepts a free-text prompt under "Tell me what data you need" and converts it to a CDA query at save time, the prompt runs once when you click Save, not on every page render. The Insert quick-prompts seed common shapes: "Show the last 5 recent entries", "List all entries from the past week", "Filter the entries by specific tags", "Fetch the entries containing taxonomy", and you can edit from there.
To adjust the query later, re-open it from the Queries section and either re-enter a prompt or edit the resolved filter fields directly. The stored query (not the original prompt) drives every subsequent render.
Pairs Well With
- Section Slots: pin a query of products, drop a card_grid section that auto-binds to it, fill the slot with your product_card section. Three layers of reuse, one query as the data source.