0
votes

I have 2 content types:
One content type is named: "Offer". This content type includes a reference field to choose one hotel, form the other content type: "Hotel". The content type "Hotel" has a term reference field called "sports".

Now I want to build a view filter, which uses the content type "Offer", and uses the sport terms which i get over the hotel relationship.

I already tried to create a relationship on my own:

  1. Reference to the hotel
  2. Added taxonomy field sport with the relationship to the hotel, which i created before
  3. Then i added the taxonomy field to my filter, and selected the Relationship in the drop down menu.

But this doesn't work at all.

Anyone can help me?

Regards M.

2

2 Answers

0
votes

The view should initially return the hotel content type.

Add a optional relationship to the offer reference field, this will give you access to the fields in the offer content type. Once you've done that you should be able to add whatever field you want as an exposed filter.

To get the sports working you may have to add the relationship Has taxonomy term in order to get what you want and then add the term as an exposed filter.

0
votes

Use the patch over at https://www.drupal.org/node/1492260 for autocomplete.

A select list should work the same way as with this patch, but it's built-in. In either case, you have to enable it by checking the checkbox in the content type field config.