The Power of Drupal Categories
Drupal Taxonomy: the power to organize and reorganize
The Drupal Taxonomy module (aka Categories) is one of its most powerful features. Combined with its hooks, Drupal allows administrators to organize and reorganize content easily, giving more flexibility for knowledge sharing in an organization that continuously discovers better ways to share knowledge.
This tutorial has two intentions:
1.In particular: To show content managers and web developers how web content can be organized and reorganized by using Drupal's Categories module.
2.In general: To show the power of Drupal for rapid reorganization and dynamic taxonomy management -- qualities that make it a good tool to facilitate knowledge sharing.
You need an installation of Drupal 4.7 with admin permissions. You also need to know that labels, tags, categories and terms loosely mean the same thing.
Scenario 1: Starting a News Web Site.
You have been asked to create a web site for a news company. They want to organize web content according to the topic of the story. The topics are Politics, Technology, Business and Lifestyle.
Step 1. Plan your content structure.
How will you organize content in the web site? In our scenario, our client wants to categorize stories as Politics, Technology, Business and Lifestyle.
Step 2. Create a vocabulary.
After logging in to Drupal, click administer > categories and click the add vocabulary tab. In the add vocabulary screen, type "Topic" as the Vocabulary name.
Next, you need to tell Drupal that the vocabulary “Topic†will be used by the Story content type. To do this, check the story checkbox under Type. This step is called binding a vocabulary to a content type.
Next, click the checkbox called Multiple select.
At this point, you will see many other options. Ignore them for now and play around with them later.
Step 3. Add terms under your vocabulary.
We now need to tell Drupal what labels are available under the Topic vocabulary. To the right of the categories screen, click add terms. In the screen that follows, type a Term name (eg, Politics) and click submit. Repeat this for each of the terms under Topic.
- Topic
- Business
- Lifestyle
- Politics
- Technology
This gives you an idea of the content structure so far.
Step 4. Now try it out by creating a story.
In the administer menu, click create content > story. Now you see the newly created Topic tags near the top of the form. Type a Title, choose Technology as the Topic, and write some text in the Body field. Click Submit.
You have just uploaded content (a story) and tagged it as Technology.
Upload three other stories and multi-tag them according to the plan below. (To multi-tag, just Ctrl-Click one item after another).
- 1 story: Business, Technology
- 1 story: Lifestyle, Technology, Politics
- 1 story: Business, Politics
Now you're seeing a bit of the power of Drupal.
Step 5. Exploit Drupal's linking system.
Now you'll get more glimpses of Drupal's power. Go back to the categories screen (administer > categories) and click list terms for Topic. Each of your terms are still listed and are actually links, too. Mouseover Business and look at the status bar of your browser -- it'll show something like http://myserver.com/taxonomy/term/555. (Note that the number 555 will be different in your case.)
The link above tells you that Business is term number 555. And, get this, you can show all stories that have been tagged as Business by just invoking the link “http://myserver.com/taxonomy/term/555†(using “taxonomy/term/555†will give the same results). Go ahead, try it on your browser. Type that link or just click on Business to see the stories that were tagged under Business.
What does this mean? First, without having to reprogram, you can create different ways of displaying content by invoking the taxonomy term numbers. You can create a directory page for your website, similar to Yahoo, simply by creating a story, typing the topics and linking them to the term number. You can even create custom menus using this technique.
You have seen how organizing content is easy in Drupal through its Categories module. You also saw that multi-tagging is easy to do in Drupal. Finally, you got a taste of Drupal's power by exploiting term numbers. That's the end of Scenario 1 of our Tutorial.
Meanwhile, you can play around with the Categories module further. Try out the other options and test the results by creating different stories. When you are ready, go to Scenario 2 (coming soon), which will teach you to harness more power from vocabularies.



Views
Thank you for this article. Putting this all together was one of the harder things about getting into Drupal in a meaningful level.
Taxonomy also connects very well with the views module allowing you to leverage these connections to determine what is displayed.
Thanks,
Steve
How to disable category menus on pages
Hi, thanks for your article, it helped me get started. I created a set of categories and terms and began building some pages, but what I noticed is that each new page had a small menu at the top edge of the content area that reflects its categories and terms. I don't want that menu, but I don't know how to disable it. I've been all through the administration panel trying to solve this one. Any help you can give would be great.
Here's what it looks like, in case my description above was not too good:
Home | Courses | Schedule | Staff <-- menu that I want to remove
(body of page starts here)
I am new to the Drupal commun
I am new to the Drupal community. I pretty much locked myself in my office this week and forced myself to learn Drupal. Granted I have not even come close to penetrating the surface of Drupal yet, however I learned a lot so far! When I downloaded Drupal I also went out and purchased a book called Pro Drupal Development, I had already downloaded Building Online Communities with Drupal, phpBB, and Wordpress. The second book gave me a pretty good rundown of what Drupal is, even though I had been researching it for quite a while prior to downloading it and getting the books. I really do enjoy the the Pro Drupal book though.
- - - - - - - - - - - - - - - - - - - - - - - - - - -
don't buy World of Warcraft Gold, make'em.
Thanx
This was very helpfull for a newbie to drupal
Multi-tagging
I know this may be rather elementary but I can't seem to multi-tag as you explain above. I get the options in a drop-down list but ctrl-click has no effect. I wonder if I need to configure something differently or what. Any ideas?
Hey there. Try this:
Hey there. Try this:
Click Administer > Categories. Then click "Edit vocabulary". Then Check "Multiple select".
Sorry I left this out to keep my article short. But it's good you brought it up. Just holler if you need more help.
Multi-taggin
So very elementary. It's under Administer>Categories not Administer>Taxonomy, but clearly I knew what you meant. Thanks for the help. And thanks for the tutorial. I'm just getting into Drupal and any guidance is much appreciated.
thanks for pointing out my error
thanks for pointing out my error. in old versions of Drupal, it was still called Taxonomy. Keep coming back and asking questions :)