JSON payload with all Parent-Child Entries (Liquid syntax)

Hi @Sebastian, here I’m trying to pass a parent-child entry with liquid syntax, its difficult to know how squidex events uses this without a documentation, also to know if what I’m trying to achieve is even possible.
Bellow is what I have tried and trying to pass to algolia. will appreciate if i can see an example of how a suidex event looks like with liquid syntax?

Sorry, I am still waiting for the docs from somebody, here is an example:

	"id": "{{event.id}}",
	"hotel_name": "{{event.data.name.iv | escape}}",
	"hotel_stars": "{{event.data.stars.iv}}",
	"hotel_attractions": [
		{% for attractionId in event.data.attractions.iv %}
			{% reference 'attraction', attractionId %}
				"name": "{{attraction.data.name.iv | escape}}",

			{% if forloop.last == true %}
			{% else %}
			{% endif %}
		{% endfor %}

Thanks @Sebastian, How can i get contentUrl? Below breaks with liquid syntax

"contentUrl": "{{contentUrl()}}",
"contentUrl": "{{event.contentUrl}}",

{{event | assetContentUrl}}

The most complete documentation are the tests actually: https://github.com/Squidex/squidex/blob/master/backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/HandleRules/RuleEventFormatterCompareTests.cs

@Sebastian thanks for your support, I have worked with en and all have been great.
Is there a way I could pass payload in other languages say zh-TW for example with below ?

	"title": "{{event.data.title.en | escape}}",
	"summary": "{{event.data.summary.en | escape}}",
	"body": "{{event.data.body.en | html2text}}",

What is the problem if you replace .en with .zh-TW

Its returns empty: screenshot from algolia

I will have a look, perhaps it is a bug. If this is so I can very likely provide a fix for the cloud today.

In my tests it works exactly like I have said, can you post the full template?

	"title": "{{event.data.title.zh-TW }}",
	"summary": "{{event.data.summary.zh-TW }}",
	"body": "{{event.data.body.zh-TW }}",     

And you are sure that you have values set for these fields? and that zh-TW is the correct language code?

Yes we have used zh-TW initially before switching to liquid syntax to show some parent child relationships. And yes I have values set for this fields.

If you use the cloud: what is your app name?

I also tested it with a rule and it works as expected for me. If you self host it, there was an older bug which was causing the rules to be cached too long. Perhaps you can try to recreate the rule.

I used cloud. Vanna Develop and Vanna 2.0

Please give me the app names as they are used in the URL for example, not the labels.

Also note that once a event is triggered, it is immutable. If you click “Enqueue” the same job is used basically.


This where I test.

1 Like

Can you join the chat on the Squidex website? Perhaps we can solve it easier there.

Okay. I don’t understand

join the chat on the Squidex website