1

Hello I would like to ask about views and exposed reference filters. I have problem with displaying my custom view for exposed filter. Can you please help?

Its kind of complex so I will try to describe the structure. I made view which should be used as exposed filter and this view works fine, but cant push it to appear in other view as exposed filter.

All of my users have some cateogies as taxonomy terms. Also every content has this category so I want to show to user only the content which is in category assigned to specific user. There can be more than one category assigned to user. Content has also single value entity reference to manufacturer.

And now I need to have a page for every content type where and I want to display all content in users category with exposed filter of manufacturers. In this filter must not be all manufacturers but only which ,there is content created with this manufacturer and the content is assigned to same category as the user.

Little example for one content type:

  • user1 - category: dj, profi video
  • user2 - category: hifi
  • user3 - category: dj, hifi
  • content1 - manufacturer: m1; category: dj, hifi
  • content2 - manufacturer: m2; category:dj
  • content3 - manufacturer: m2; category: profi video
  • content4 - manufacturer: m3; category: hifi

In this point the exposed filter for user1 should display: m1, m2. Or for user2: m3. Or for user3: m1, m2, m3.

0

You need to set up relationships between the three content types in your View. Essentially, you have to set up relationship user->category, then relationship category->manufacturer, at which point the manufacturer fields will become available in the exposed filters section. There is a great tutorial here how to do this.

  • Thank you @longboardnode for reply. The problem was that I still wanted to add filter Content: "name_of_field" (reference filter) but only reference field where I could choose my view was User: Name (reference filed). But the problem is that it shows only one option. Even if in the reference display view is everything ok. What is the problem now? How can I get different filter field where I can choose my reference display view? – koty0f Oct 26 '15 at 14:33
  • I'm sorry but I'm not quite clear from your comment how you have things set up right now... Can you either add a screengrab of your view and relationships, or describe both as clearly as possible and in more detail? :) – longboardnode Oct 26 '15 at 21:25
0

Thanks. Im attaching image how the structure look like. The result should be the page for every content type except Manufacturer, where the user can filter the content by manufacturer. So there will be exposed filter with list of avaliable manufacturers who is assigned to current content type according to users categories.

Now just came in my had that Manufacturer can be taxonomy eather. But Im not shure if it will be easier to make this happen.

entity reference user exposed filter

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.