Grab items from a collection filtered by the value(s) of a field


I have:

  • a collection 'use_cases'
  • a blueprint 'use_cases' connected to the collection 'use_cases'
  • a taxonomy 'categories'
  • in the blueprint 'use_cases' there is a field 'Categories' with handle 'categories'
  • this taxonomy has 1 term titled Homepage (slug: homepage)

What I like to achieve is to get all items of use cases, that have been linked to the category/taxonomy 'homepage'. So that I can show the use cases on the homepage that I like to show there, and hide others that are not relevant for the homepage. On other pages I'll probably like to also filter on different categories, so that each page where we display usecases we pick/set which usecases should be displayed on that page.

This is how I currently loop through the use cases in my view files:

{{ collection:use_cases limit="5" as="cases" }} {{ cases }} {{ title }} {{ author }} {{ /cases }} {{ /collection:use_cases }}

Hopefully I explained it well enough :-).

>>>>>>> Unanswered <<<<<<<
1 Reply
1 Follower