I have defined a vocabulary that allows multiple terms to be checked for a Content Type and I would like to create a View that could gather all the data from that Content Type but grouping the results by a specific term.
When I'm not applying any contextual filter, the result list should contain a group of data for every term in my vocabulary. Naturally, some of the items will appear in multiple groups because of the multiple terms scenario.
I would like to create a contextual filter for a specific term and get as a result only one of those groups. The problem is that I'm getting not only the group I expect but other groups in which some of the results have more than one term selected for the same vocabulary.
For example:
- Content type is "Dogs".
- Vocabulary is "Places".
- Taxonomy terms for "Places" are: "Kitchen", "Living room", "Garage", "Outside".
"Dogs" has a field called "Places to play with my owner" which is related to "Places" and the user can select one or more options.
I created a view that has:
- A relationship with "Places" vocabulary.
- A contextual filter that retrieves all the "Dogs" that play on each of those places when there is no specific term to filter.
- A field group using the "Places" term names.
And retrieves the following results on a URL like: /dogs/places-to-play/
:
- Kitchen: Dog A, Dog B.
- Living Room: Dog A.
- Garage: Dog C.
- etc.
The contextual filter should receive a "Places" term name via URL like: /dogs/places-to-play/kitchen
and the expected result would be:
- Kitchen: Dog A, Dog B.
But in my case, the results are:
- Kitchen: Dog A, Dog B.
- Living Room: Dog A.
Because "Dog A" has options "Kitchen" and "Living Room" selected in its "Places to play" field.
The question is: Is there a way to avoid getting the extra groups?
Thanks in advance.