1

I have 2 roles. Each role can create a certain content type. Both content types are using the same taxonomy terms in several fields:

Content type 1: Project
- Field: Service Type (Term reference)
- Field: Cost (Term reference)

Content type 2: Preferences
- Field: Service Type (Term reference)
- Field: Cost (Term reference)

Role 1 can create unlimited projects (1:n), while role 2 can only create 1 preferences node (1:1).

Now I want to create a view for role 2 users, displaying all the projects that match their preferences. I know this is done by certain relationships in the view. I just can't figure out which ones to set.

Thoughts?

2

You'll need a relation from the 'settings node' to the taxonomy term, and then from the taxonomy term to all other nodes.

The corresponding relations are called Content: Taxonomy terms on node and Taxonomy term: Content with term (which only becomes visible after adding the first one).

From there you can apply filters to the nodes. The relations you select for the filters distinguish between the base node and all linked nodes.

  • Thank you for the answer! I've added both relationships and so far I get a list of all projects with duplicates, while only 1 project currently matches the preferences node on the selected taxonomy term (Meaning: My goal is to get a list with 1 project entry to proof the method right). I tried a few filter criterias, but didn't find the right settings yet. – Patrick Bozic Mar 18 '16 at 12:05
  • You can probably enable aggregation to get rid of the duplicates. And you might need a field comparison filter to match the value of one node to the other node. (Add the taxonomy field with and without relation as fields first), then in the field comparison filter ensure they match. – Neograph734 Mar 18 '16 at 12:18

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.