开发者

How do I set up filters in a Drupal view that apply across two different content types?

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 typ开发者_运维问答es 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


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])

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜