0

Have 3 content types. Apartment, hotel, motel.

Each has integer field "number of beds".

Lets say user wants to see apartments that have between 10 and 15 beds. In views for apartment i made exposed search filter adding number of beds 2 times, 1st is "greater or equal to" and 2nd is "less or equal to".

This all works fine.

Now i want to apply this filter to all content types in one view so that user after entering from 10 to 15 beds applies this search request to all content types at same time.

Solution that should work is to create 1 bed field on apartment and use that existing field on hotel and motel, but i want to have it separated so that i have control of each field in each content type separately.

I have tried Global: Combine fields filter, but it does not support "greater or equal to", "less or equal to" etc.

5
  • What kind of control do u mean? Aug 17, 2015 at 7:53
  • To have 3 fields (1 from each content type) in exposed filter combined so i do not need to make each field from each content type exposed, it would not make sense to the user.
    – Azz Kawa
    Aug 17, 2015 at 8:33
  • I mean what if it will be one time configured field and it will be used as "existing field". What the problem will be in this way? Aug 17, 2015 at 8:47
  • first of all reuse the filed in all 3 content types. then make a view of all content. then expose the field that is being reused in all content types, with an operator of is between, it will give you 2 textfileds of min and max. and modufy the view according to your needs. Aug 17, 2015 at 8:47
  • Most of the field settings are independent to the instance of a reused field so each node type can have different settings but you can use the same field. I always advocate reusing fields for use cases exactly like this one. Aug 17, 2015 at 9:55

1 Answer 1

0

Create your first view block for Apartment with the exposed filter. Create attachments for each of the other two that inherit the exposed filter. As the comments stated, as long as they used the same field this will work perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.