I'm struggling to order items returned via the Kontent.ai delivery rest API using a field on the linked item of that piece of content.
My content model is as follows:
Web Page
- contains generic information about a given web page e.g. metadata, url slug etc.Page Template
- contains the page data, posted date, content etc.
Each Web Page
must have a Page Template
as a linked item, and I ideally want to order all web pages on the linked page template posted date on list pages for example. But I can't seem to find anywhere in the docs to suggest this is possible.
Has anyone had any success with doing this?
Here is what my current orderByDescending
call looks like:
orderByDescending("elements.page_template.linkedItems[0].elements.publication_date")
But this gives me an error.