Using two taxonomies.
Fruit:
Banana
Orange
Blueberry
Strawberry
Lemon
Fruit taxonomy has a term reference to the color taxonomy
Color:
Red
Orange
Yellow
Blue
Purple
Green
Created a view using the built in taxonomy term view in a content pane::
Fields Taxonomy term: Fruit Color [this is excluded from display]
Taxonomy term: Name
Filter criteria Taxonomy vocabulary: Machine name (= Fruit)
Relationships Taxonomy term: Content using Fruit
[Configure Relationship: Taxonomy term: Content using Fruit Relate each Content with a Fruit set to the term. Require this relationship]
View Output::
Red
Strawberry
Orange
Orange
Yellow
Banana
Lemon
Blue
Blueberry
I would like to add a contextual filter to this view that takes the Color taxonomy name from the url and only shows the fruit for that color.
color/red would only show:
Red
Strawberry
color/yellow would only show:
Yellow
Banana
Lemon
I'm stuck on how to add the contextual filter. I've tried taxonomy term name with validation set to change the term name to id. I also tried the fruit_color field with validation set to change the term name to id.
Should the term name/fruit_color field be configured differently? Do I need to add another relationship?
Additional info: The view displays taxonomy terms. The result set is empty when I try adding a contextual filter. The relationship field should only show Fruit terms that have been used at least once to tag content.