I've got these two content types, A and B. It's pretty straightforward to set up and display them in the same view. However, I can't get them filtered. I've added two filters rules, one for each content types, a1 and b1 respectively, in the hope that I can extract the right parts of the data from A and B and show them in my view. But that doesn't work out.

// a1=published and content type A and category=aa b1=published and content type B and tag=bb //

Here is what I got while trying to do so:

  1. no rules at all, view displays all the stuff from A and B
  2. rule a1, view displays A only
  3. rule b1, view displays B only
  4. rule a1 or b1, shows nothing

    filter groups i used

Is there anything wrong or filter criteria can only be applied? Any help is appreciated.

--update 1-- I did some more experiments about grouping filter criteria:

 - case 1
Content: Published (Yes)  AND  
Content: Type (= Portfolio)  
Content: Published (Yes)  AND  
Content: Type (= Blog entry)  AND  
Content: Tags (= frontpage) | Settings   
 - case 2
Content: Published (Yes)  AND  
Content: Type (= Portfolio)  
Content: Tags (= frontpage) | Settings   
Content: Published (Yes)  AND  
Content: Type (= Blog entry)  AND  

"Content: Tags" is a unique field which only appears in content type "Blog entry" . To my surprise, case 1 and 2 will yield the same result, blog entries, even though "Content: Tags" has nothing to do with the content type "portfolio".

--update 2-- a bug?
Incorrect filter group OR behavior


a1 and b1 will show nothing, because content type == A AND content type == B is always false for 'A != B'

On filter block, you have a drop down with options. You need to group them into groups connected with OR, so you will have:

published and ( (content type == A and category == aa) or (content type == B and tag == bb ) )
  • Hi Mołot, I did use "or" instead of "and", please find the link of screenshot I just added to the original question which displays my filter groups setting. Thanks – KuN May 16 '13 at 18:14
  • Looks OK, and that's a bad news. It means I cannot help you. – Mołot May 16 '13 at 19:11

If you want to show parts (you must mean fields) of your two content types just do the following:

  1. Add a filter of Content type checking the two content types A & B
  2. At the Format/Show section click on content and on that window choose fields.
  3. Then go the Fields section and start adding fields that belong to those types.
  • Thanks, but I've already managed to show the fields in view. It is the individual filter criteria that confused me. – KuN May 16 '13 at 18:00
  • No problem. Glad you solved your problem. – Billy May 16 '13 at 18:31
  • Actually the problem is still there, I can't filter the right nodes to be shown in my view. I've add some update to the original question. THX – KuN May 16 '13 at 18:38
  • case 1 seems correct. are you sure you have created nodes of protfolio type? – Billy May 16 '13 at 19:34
  • yes, I can see them if I use "content type" as the only filters. – KuN May 17 '13 at 0:55

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.