views:

60

answers:

1

I have two different content types being loaded into a view.

News, and reviews.

Each of the content types has a drop-down box to select what category they fall into.

ie. a review could be for a dvd, music, etc. and news could be music, cinema, etc.

I want to the view to display some categories of news, and some categories of reviews, but not all.

I tried adding a filter "does not contain" for each of the news categories that I wanted to exclude, but as soon as I did this, none of the reviews would display. Doing the same for reviews would cause all of my news items to disappear.

I assume that this has something to do with the fact that the reviews content type has no "news category" field attached to it (and vice versa), and the view is removing it from the display indiscriminately because of that.

So how do I set up a filter to target only content types that it is relevant to, ie. "only filter content by this field if the content actually has this field defined"?

btw. I'm using Drupal 6

A: 

I think this is more complex than Views can handle by itself. You might try Views Or to set up more complex queries, e.g. (type is review and category is [review_category]) OR (type is news and category is [news_category])

Scott Reynen
I'll look into that. Would I be better off just defining one "article" content type and attaching "review category" and "news category" fields to that, with the option of "N/A" for each?
David Meister