In a twig template, how can I request a collection with pagination, limit, and order using “findTaxonomy”? I need to create a list of the latest posts in certain categories. The following experiment does not work:
{% set blog_collection = taxonomy.findTaxonomy({'category':['Music', 'Film']}, 'or').visible().published().setParams({'limit': 5, 'pagination': true}).order('date', 'desc') %}
Alternately, is there some other way to accomplish the same thing? I did try the usual way but it seems to only allow one category. That is, I can't say {'@taxonomy.category': 'Film, Music'} or {'@taxonomy.category': ['Film', 'Music']} in the following:
{% set blog_options = { items: {'@taxonomy.category': 'Film'}, 'limit': 3, 'order': {'by': 'date', 'dir': 'desc'}, 'pagination': false } %}
{% set blog_collection = page.collection(blog_options) %}
Note that I cannot use frontmatter in this case, as there are other parts of this complex page with different needs. Plus I really want to know how this works in twig.
I tried posting this question but somehow it got archived so I'm trying again.