0

I have a view "news" which is listing nodes from "news" content type. This content type contains a field "countries" which is multiple.

So, my news "Test 1" will have a field countries like this one : France, United Kingdom, Spain

My users have a field "Country".

What I want to do is to add a filter criteria in my view meaning : News.countries = Users.country

At this moment, when I try to do it, I cannot set a "must be equal to" to News.countries, certainly because it is multiple.

Can you explain to me how should i do ?

Pauloscorps
  • 564
  • 1
  • 6
  • 16

1 Answers1

0

You should use a contextual filter. Add a relation to current logged in users country and add a contextual filter for the field new.country and use the relationship.

sgoelz
  • 238
  • 1
  • 6
  • Thank you, I didn't know about relation or contextual filter. I tried to add the relation to the current logged in user, but it is not in the list. – Pauloscorps Oct 10 '17 at 13:41