I'm trying to filter content based on user data.

I've created taxonomy and made the "link" between my user and my element. For this part, it's working.

Taxonomy is "Privilege" which contains "Gold" and "Silver"

User also contains this taxonomy.

In my first view, I have some filter (if article and user are premium, show article), this is working.

Now, I want to show all articles which have 0 Privilege (but the user can have one).

In my second view (I've added an Attachment to the first view), I can display all articles, but this is showing all articles, including filtered articles from my first view.

How to add a filter where taxonomy of article is different from user taxonomy ?

EDIT : I've made some changes. I've created another privilege called "nothing". If "nothing" is set, show the content.

I have my first page, which list all content filtered by user data, and I've added an attachment which list all content where privilege = "nothing".

How can I do to "merge" page and attachment ? It only add a option "add before/after page". This is working, but I want to add the result of the attachment to the pagination of the page.

  • Two possible solutions, both would need you to switch from multiple views to one: Assign all less privileged levels to the users as well. So a gold user has 0, silver and gold. Then you can present all articles to him. Second approach: Use nested privileges and configure your contextual filters (suppose you use them) to also include parent/child terms. – Mario Steinitz Aug 21 '18 at 15:24
  • What is the method you're using to show User info in the Content type View? Are you trying to list all users who share the same taxonomy terms with a node, or filter content according to the user viewing it? – prkos Aug 21 '18 at 19:40
  • I'm trying to show content type by user privilege and if the privilege is not set. – Morgan Tartreau Aug 22 '18 at 8:54

Your Answer

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

Browse other questions tagged or ask your own question.