Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

Started by Christopher Pickert 9 years ago · 0 replies · 886 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 complanar, 6 days ago
6 139 15 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 51 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago