Detail and recommendations
What you're building: a page that renders one record from Algolia, with a row of related items underneath.
Two separate features that usually appear together. Detail renders one record. Recommendations ask Algolia what else to show.
Detail
- Applies toA Section wrapping the record
Marks the detail region.
- Applies toThe detail wrapper
Which index to load the record from.
Inside the wrapper, bind fields exactly as in a result card:
<section wf-algolia-element="detail" wf-algolia-index="products">
<h1 wf-algolia-text="name"></h1>
<img wf-algolia-image="hero" wf-algolia-alt="name" />
<div wf-algolia-html="description"></div>
</section>
Which record
The script has to work out which record to load. In order:
- — a literal ID on the element
- — where to read it from, such as a URL segment or query parameter
- — match a field other than
objectID
On a Webflow CMS template page the usual approach is to bind the objectID value to a CMS field, so each generated page carries its own.
Detail page missing wf-algolia-index— no index on the wrapperDetail page: no objectID found in URL or attributes— nothing identified the recordDetail page: object not found for— the ID resolved but no record matched
The third usually means the record exists in Webflow but has not synced to Algolia yet.
Repeating fields
For an array field — sizes, tags, related links — mark a wrapper and one child . The item is cloned per entry.
Recommendations
- Applies toA Section below the detail
Marks the recommendation region.
- Applies toThe recommend wrapper
Which Algolia Recommend model to query.
- Applies toThe recommend wrapper
Which index the model was trained on.
- Applies toA Div inside the wrapper
Where recommendations render.
A recommendation section needs all four of a model, an index, a grid and a template. Missing any one produces a single console message:
[wf-algolia] recommend section missing model, index, grid, or template
Tuning
- — how many to show
- — minimum confidence score
- and — for trending models scoped to a category
Algolia Recommend learns from traffic. On a new index, or one without Insights events, a correctly built section renders nothing at all. That is the model, not your markup — check Dashboard → Recommend before debugging attributes.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Detail page renders empty | No objectID could be resolved | Check the URL and the objectid attributes |
object not found for | The record has not synced to Algolia | Re-run the sync |
| Recommendations never appear | The model is untrained | Check Dashboard → Recommend |
recommend: unknown model | The model name is misspelled | Use an exact Algolia model name |
| Only one recommendation shows | No template inside the grid to clone | Add one |