Hi,
I have the following custom document in a Rule that gets triggered on Updated
:
Liquid(
{
"id": "{{event.id}}",
"status":"{{event.status}}",
{% for brandId in event.data.make2.iv %}
{% reference 'brand', brandId %}
"brand": "{{brand.id}}"
{% endfor %}
}
)
This particular line is not working:
"brand": "{{brand.id}}"
I’ve tried several combinations; none of them give me any values from the referenced content. brand.id
would be the simplest scenario but it does not work.
Data structure:
{
"data": {
"queryProductContents": [
{
"data": {
"make2": {
"iv": [
{
"data": {
"name": {
"en_US": "Brand 1",
"sv_SE": null
}
}
}
]
}
}
},
{
"data": {
"make2": {
"iv": [
{
"data": {
"name": {
"en_US": "Brand 2",
"sv_SE": null
}
}
}
]
}
}
},
What am I missing?
This is how it looks in Algolia:
I’ve checked the following docs:
https://docs.squidex.io/02-documentation/developer-guides/rule-formatting/liquid#reference
I’m using squidex/squidex:5.5.0
I’ve tested recreating the rule since I read in some forum post that in some older version there were some caching issues.
Btw, if you think make2
looks weird that is the correct field name. I just have another one that is called make
that is an old/deprecated field.
Also, both the parent and child (referenced content) contents have status
Published
.