Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

In twig: multiple taxonomy collection with pagination, limit, and order?

Started by Christopher Pickert 9 years ago · 0 replies · 668 views
9 years ago

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:

TWIG
{% 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?

Note that I cannot use frontmatter in this case, as there are other parts of the page with different needs. Plus I really want to know how this works in twig.

last edited 10/09/17 by Christopher Pickert

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 51 8 hours ago
Support · by Anna, 2 days ago
2 58 10 hours ago
Support · by Justin Young, 11 hours ago
1 30 11 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 55 5 days ago