What is Taxonomy in Drupal?

Taxonomy = classification, according to natural relationships   This is a real quick look at it.
When you see taxonomy in Drupal it is refering to content indexed with key-words and categories. Kinda like the contents page in a book. You can add taxonomy to any content type in Drupal and use the "taxonomy terms" to arange things the way you want.
One Drupal example: a Classified Ad is not a page, blog post, or story content type,
It is a content type "Classified Ad", it is "For sale,trade,rent",name of select list "type of ad"....
--------RESULT is a "content type" that uses "Taxonomy Terms"  from a "Taxonomy Vocabulary"
read more for 2 quick walk throughs... one easy and the one above
 

First you need to enable the taxonomy module in the modules list at Administer > Site configuration > Modules > List
The taxonomy module is included with Drupal core, so it is in the module list. 

Case: Type of Page
First, we already have a content type, Page. But maybe we want to add taxonomy to our pages.
we want to know when someone creates a page, what it is for --Personal, Private, Business--


Make a vocabulary for our page:
When we want taxonomy for something in the site, we need to create the 'taxonomy vocabulary' with the 'taxonomy terms' so we have it to use in our content types. Goto: Administer > Content management > Taxonomy
Hit the 'Add vocabulary' tab and give this one a name 'Type of page' and check mark which content types it will be used for and save it. Then add terms to the vocabulary, 'Personal' and save. Add term, 'Private' and save. Add term 'Business' and save.

Goto:  Content management > Content types > Edit page > Manage fields
we can make it required, so we will always have a taxonomy term for every page that is created.

later, we want all personal pages to show up. we might goto www.mysite.com/personal/all depending on how we have our URL aliases set for the "content or node type", page.



  Case. Classified Ad

First we need a "Content Type" called "Classified Ad", so a user will go to create content and they will choose Classified Ad, Blog Entry,  page or story. We have page and story now---we need a new one--classified ad.

We go make one with CCK -content construction kit-     Content management > Content types > Add content type

While we are making the new content type(classified ad) we will add a select list for the person to choose what type of ad it will be...We will call the select list "type of ad" and the choices we allow them to pick are
--"For Sale, For Trade, Appliances, Boats, Cars, Trucks, Help Wanted"--

By doing that, we have created a new content type (Classified Ad) that uses a Vocabulary (type of ad) with Taxonomy Terms (for sale, trade and so on) in the Taxonomy Section of Drupal.

To view that new List of Taxonomy Terms, Goto:  Content management > Taxonomy > List
To create a new classified ad                    Goto      Content management > Create content > Classified ad
There you will fill out the form that you created with the content construction kit module or CCK.

If you make a new content type, remeber to go set permissions for it.      Administer > User mangement > Permissions

Back to Top

 Back to Top