predictive_ search_ resources
Contains arrays of objects for each resource type that can be returned by a predictive search query.
You can check whether any resources of a specific type were returned using the size
filter.
{% if predictive_search.resources.articles.size > 0 %}
{% for article in predictive_search.resources.articles %}
{{ article.title }}
{% endfor %}
{% endif %}
Properties
- collectionsarray of collection
The collections associated with the query.
Anchor to
{
"articles": [],
"collections": [],
"pages": [],
"products": []
}
{
"articles": [],
"collections": [],
"pages": [],
"products": []
}
Was this section helpful?