I’m trying to put some text on the screen with a query like this in my yml:
text: '{{site.find(page.parent.uid).index.filterBy("autoid", page.department).getField('title')}}'
This works just fine most of the time, but when page.department
is empty, I end up with the wrong title.
I was hoping conditionals were possible in this “language”, but I can’t find the name of the language nor any reference to it anywhere in the Kirby docs.
So I guess I have 3 questions:
- What is this language?
- Where can I find docs for this language?
- Are there conditionals in this language, and if so what is the syntax?
Here’s what I tried which didn’t work:
text: '{{page.department ? site.find(page.parent.uid).index.filterBy("autoid", page.department).getField('title') : ""}}'
text: '{{page.deparment && site.find(page.parent.uid).index.filterBy("autoid", page.department).getField('title')}}'
text: '{{r(page.department, site.find(page.parent.uid).index.filterBy("autoid", page.department).getField('title'), "")}}'
text: '{{e(page.department, site.find(page.parent.uid).index.filterBy("autoid", page.department).getField('title'), "")}}'
I suppose I could try more things, but it’s just incredibly frustrating to have to stab wildly in the dark like this, so I’m really hoping I can just find some docs for this mysterious language.
Thanks for any pointers