Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Filtering results using multiple taxonomies

Started by Muut Archive 11 years ago · 1 replies · 630 views
11 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 Muut Archive, 10 years ago
1 676 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago