1

I've been playing with Views in trying to expose only a certain content type to the View, but I cannot find a way to do so.

For example:

I have a content type called Regions and I have 3 nodes of type Regions.

When I create my View, is there a way to only expose the 3 nodes of type Regions?

Currently, it displays all the entries in my node table, which is not what I want.

1 Answer 1

1

You want to add a filter to your view that is a content type filter, and then select "only show" and check off "Region" in the checkbox list.

So, edit your view, and on the left under "Filter criteria" click add. Then, scroll through the list of available fields to filter on and find "Content: Type", check that off, click "Apply". Then, on the left, select "Is one of" and on the right in the checkbox list select "Region", click "Apply".

After you've done that you can save your view. The changes should be applied and should be showing only nodes in the view that are of type Region.

2
  • thanks I got it with your help. Another question, what is the difference between filter and contextual filter?
    – chlong
    May 14, 2012 at 19:09
  • 1
    Eh, I have a basic understanding, but if you have a technical question like that it's wise to ask another question on Drupal Answers, that way it becomes searchable and thus more useful to others. Only ask though after you've thoroughly searched for the answer. May 14, 2012 at 19:21

Your Answer

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

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