Last updated March 26, 2011. Created by ksenzee on April 17, 2006.
Edited by linclark, Michelle, drupalec, cel4145. Log in to edit this page.
This tutorial will teach you how to use filters in the views module. If anything doesn't make sense, do tutorial #1 on the previous page first.
Make a category called News
- Go to administer > > categories.
- Click tab called "add vocabulary."
- Enter "news" for vocabulary name.
- Click "blog entry" and "story" for node types.
- Click submit.
Add a vocabulary term called "Module News"
From the administer >> categories page
- Go to the row called News.
- Click "list terms."
- Click tab "add term."
- Type "Module News" for term name.
- Click submit.
- Click tab "add term."
- Type "General News" for term name.
- Click submit.
Make a new page with category "Module News"
- Go to "create content."
- Pick "story."
- For title, put in "Module-Builder Module released."
- For the category, pick "Module News."
- For body, put in "The module-builder module lets you build modules."
- Click submit.
Make a view called Module News
- Go to administer >> views.
- Make a new view called "Module News" (See Tutorial 1 for views module if you don't know how).
- Put in "modulenews" for description.
- Put in "Module News" for title.
- Choose Page View.
- Choose List View.
- Put "modulenews" for the URL.
- Add a field called Title.
- Add a field called Date Updated.
- Delete the existing filter.
- Under filters, do add filter.
- Taxonomy: Terms for News is one of module news. For sort criteria, delete the current one.
- Add one called Node, last updated time.
- Pick descending.
- click submit
Congratulations. You are done.
The page is at www.example.com/modulenews (replace "example" with the name of your site).
Comments
Filter problem?
I did this same tutorial using some different names. I made a content type -> its' category is the one I created. I've selected the filter in my view and when I hit the view page, I still have all the records, even though I only asked for the RFP ones in my filter. The result is that I am seeing all of my content - no filtering working. I am positive I've filtered on the right taxonomy item and there are no duplicate category names I could be fumbling around with.
Any advice?
Filter for "Taxonomy: Terms for News" doesn't work
I've also followed this tutorial using Drupal 5.
I have the categories module installed, so "Vocabulary" becomes "Container", and "Term" becomes "Category".
I found that no content would display in the filter, until I deleted the "Taxonomy: Terms for News" filter, and put in another filter, e.g. "Node: Type" -> "Is one of" -> "Story item".
I don't know why some filters work and others don't.
I can see the Story item created above is definitely in the category "Module News", yet will not get displayed under that filter. If I set the filter to "is none of", then it gets displayed along with all the other content items.