1

I have created a view, in which I apply a filter on a taxonomy term field that can contain multiple values. This field is also displayed in the view. Is there any way to only display those values in the view that match the filter?

For example:

  • Field of one node contains both terms A and B.
  • Filter set to select all nodes containing term A.
  • The view should only display A (not B) for this node.

If I uncheck the "Display all values in the same row" option, the view splits the entries, but I can't seem to get rid of the extra values. I have also tried enabling "distinct" values and the "reduce duplicates" options; neither option helps.

Am I missing something simple?

1

It's most important for you now to get how Views works. Views are nothing more than (really good and elaborate) query builder. Each time you set a filter, what you are really doing is adding another condition to query's WHERE line. It does not, in any way, affect anything before WHERE - especially not list of fields to obtain.

Now, you are not first one to need this. So there is Views Filter Field module, that simply allows you to display filter's value as a field. That way if you want nodes with A, don't show the terms attached to a node. Just show a filter's value of A, and you will get what you wanted: A, but not B even if node contains both A and B terms.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.