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

Filtering results using multiple taxonomies

Started by Muut Archive 10 years ago · 1 replies · 459 views
10 years ago

I have two categories (C1, C2) and four tracks (T1, T2, T3, T4). I want to build out four pages like so page 1 =( C1, T1), page 2 = (C1, T2), page 3 = (C1, T3), etc. the category taxonomy is working but the track taxonomy is not. I am using this is my twig file: {% set sessions = page.collection({'content.items':{'@taxonomy.category':'C1'}}}) %}
and further down:
{% for session in taxonomy.findTaxonomy({'category':['C1']} ) %}
my frontmatter is:

YAML
content:
    items:
      '@taxonomy.category': C1
      '@taxonomy.track': T1

The result I get is the whole C1 category with T1, T2, T3, T4. It is not limiting the result to C1, T1. Is there a way to do this?

P.S. I have the taxonomies defined in my site.yaml

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1361 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2958 9 years ago
Archive · by Muut Archive, 9 years ago
3 1123 9 years ago