Home

Primary links

  • top o the deck
  • Drupal for Beginners
  • about
  • links
  • give me some sugar

Drupal stuff

  • EDAM
  • STARDOM
  • Question Bank
  • Drupal musings
  • Drupal tips
Home

Key stuff on this site

Easy Drupal Admin Manual (EDAM)

SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)

Drupal for Beginners

Subscribe to posts by RSS or email

Subscribe to Drupal Ace by RSS feed RSS feed 

Subscribe to Drupal Ace by Email

Donate towards my web hosting bill! Get a great host!

Share and save

Share/Save

Random piece of content

Oof! Hit by bad_httpd_conf error

Manuals on this site

  • Easy Drupal Admin Manual (EDAM)
    • Welcome to Your Site
    • First Steps: Please Read!
      • Understanding These Instructions
      • Important Terminology!
      • Best Practices for Site Admins
    • Super Quick Guide (for the experienced and the brave)
    • Logging In
    • Your Administrator Tools
    • Setting Site Basics
      • Setting Site Information
      • Configuring Your Theme
    • Creating Content
      • Node Types
      • Create a Page Node
      • Create a Story Node
      • Create a Blog Entry Node
      • Making Images and Other Files Available
      • Using Text and Image Editors
    • Organizing Your Content
      • Terms, Vocabularies, and Taxonomy: "Tagging" Your Content
        • Taxonomy Suggestions
      • Menus, Links, and Paths: Navigating the Site
        • Content Paths and URLs
        • Creating Links
        • Working with Menus: Administration Form (Drupal 6)
        • Working with Menus: Administration Form (Drupal 5)
        • Creating Menu Items on the Fly
        • Placing Menus on Your Pages
      • Placing Content on pages
        • Creating a page from a Single Node
        • Creating a page from a List of Nodes
        • Setting the Front Page
      • Working with Blocks
    • Maintenance Stuff
      • Maintenance and Construction Notices
    • Other Fun Things
      • Changing Color of Garland Theme
      • Free Aliases!
  • SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)
    • Set a Clear Goal
    • Make a Good Site
      • Put out the Welcome Mat
      • Make Great Content
      • Build a Great Brand
      • Make Navigation Easy
      • Tune Site Performance
    • Drive Traffic
      • Promote your Site
      • Get Found with SEO
    • Build a Community
      • Build an Offsite Community
    • Monitor and Improve
    • One-Page Checklist
    • Drupal and the Blogging Starter Checklist
      • Drupal and the Blogging Starter Checklist, Part 1
      • Drupal and the Blogging Starter Checklist, Part 2
      • Drupal and the Blogging Starter Checklist, Part 3
      • Drupal and the Blogging Starter Checklist, Part 4
      • Drupal and the Blogging Starter Checklist, Part 5
      • Drupal and the Blogging Starter Checklist, Part 6
      • Drupal and the Blogging Starter Checklist, Part 7

Recent comments

  • Deleting cookies

    Good point; thanks! Deleting cookies and/or caches, depending on the problem at hand, is a part...

  • It worked

    adding $GLOBALS['tempUser'] = $user; worked but I find it worth noting that I had to delete...

  • very good document...

    very good documentation for beginners!!!!!! thanks!!

  • del penitential 62

    strike out abject
    eliminate penitent 5

  • Chat

    Thank you a lot about very beneficial to my work was very useful thank you

more

taxonomy

Taxonomy Suggestions

  • admin
  • content
  • Drupal
  • taxonomy

You can create whatever Terms you can think of a use for, grouped into whatever Vocabularies you like. There are infinite possibilities – which always makes it hard to get started.

General strategy

It's difficult to immediately envision all the ways to set up your taxonomy, and all the possibilities for using it. Here's a general suggestion for starting out:

Sit down and do a little thinking about what keywords you may want to call upon in the future. You'll probably want at least two main groups of keywords (and thus, at least two Vocabularies): one that describes what a piece of content is, and one that describes what the content is about. (At least, I've always found that useful.) See examples below. You may want additional Vocabularies, depending on what your site is about.

Next, fill each Vocabulary with Terms. If your site already has some Terms set up, delete any you know you won't need, and add Terms you think you will need. If in doubt, add a Term; it's easier to add it now and ignore (or even delete) it later if it turns out unnecessary, than to add it later (and belatedly tag all the old content that you now want that Term attached to).

Finally, on the technical side: If you're not worried about other users tagging content in odd ways, go for flexibility. Allow your Vocabulary to use the "Multiple select" option, and maybe skip the "Required" option. Consider free tagging too.

In summary: You can change your taxonomy and its workings any time down the road, but if you have a lot of content already in place, you'll have a big job going back and re-tagging all those old nodes. A little strategizing up-front can save you a lot of work later.

Example taxonomy: generic site

Here's a simple set-up that works for a lot of sites:

Vocabulary 1: Content Type

This Vocabulary is for Terms that describe what the content is. Not node type (Page, Story, Blog Entry, etc.), but its intended purpose within your site. Fill this Vocabulary with Terms like 'news', 'general info', 'essay', 'report', 'article', and so on. Some child Terms may make sense: 'news', for example, could have child Terms 'announcement' and 'press release' under it.

Vocabulary 2: Content Topic

This Vocabulary is for Terms that describe what the content is about. More than the above Vocabulary, appropriate Terms here will vary widely by site. Fill it with Terms that make sense for yours: 'product', 'company', 'website', 'celebrities', 'hobbies', etc.

For more detail, add child Terms. For example, the broad Term 'product' could have product categories (or specific products) under it as child Terms.

Using the Terms

The above two Vocabularies should enable pretty powerful organization of content. Any content should fall under a combination of one Term from each vocabulary (or more than one from each).

For example, a notice about an upgrade to your company's website would use the Terms 'announcement', 'company', and 'website'. How about general company background? The 'General info' and 'company' Terms. A case study on a new product? 'Report' and 'product'.

Example taxonomy: recipe site

As another example, a site for collecting recipes might do well with this taxonomy:

Vocabulary 1: Content Type

Same as above, but recipes themselves are key enough to this site to be considered a major type of content, not just a topic under 'general info' or some such. Inside the Vocabulary called "Content Type", add a new Term, 'recipe'. (You'll also want to decide on a consistent node type to use for recipes, such as Page, Story, or even a newly-created Recipe node type.)

Vocabulary 2: Recipe Type

Fill this with Terms like 'main dish', 'desert', 'appetizer', etc.

Vocabulary 3: Recipe Style

Fill this with Terms like 'Chinese', 'French', 'Mexican', etc.

Using the Terms

With this set-up, it's easy to see how your site can quickly call up, say, all Chinese main dish recipes (via the Terms 'recipe' + 'main dish' + 'Chinese'), or any other combination. Bon appetit.

Wrapping up

Setting up your Vocabularies and Terms can take a little effort, as does remembering to tag content as you create it. But as your content grows, the ability to locate and organize it via those tags will make the work well worth it.

  • 2 comments
  • Quote

Terms, Vocabularies, and Taxonomy: "Tagging" Your Content

  • admin
  • content
  • Drupal
  • taxonomy

Words about words

Tags are power

Drupal offers a very flexible system for "tagging" your content – that is, attaching keywords to it for use in organization or searching. Why do that? As software developers and webmasters everywhere know, tagging content makes it so much easier for software to know what content is about. With tags on content, a program can instantly pick out, for example, all news articles that are about politics, or all product catalog listings that are cooking-related and are books (i.e., not just any cooking tools or any books, but only cookbooks). 

Drupal can do the same with tagged content on your site. It's a very powerful tool that makes many things possible – so powerful and flexible, in fact, that the possibilities are overwhelming at first. This page outlines basic ways you can make use of tagging to organize your site content.

A word about words about words

First, a word about terminology. Let's revisit the discussion of "Taxonomy" from Important Terminology!:

Drupal lets you assign keywords, or "Terms", to your nodes. The language it uses to discuss this, however, can be a tad confusing. Here's your guide:

  • Taxonomy: This is the overall name for the system Drupal offers to classify and organize nodes in your site by assigning them tags (called Terms; see below). You don't have to use Drupal's Taxonomy features to organize content, but it's usually extremely useful to do so.
  • Term: A Term is a keyword or tag that you can associate with a node. Useful Terms include words like "news", "product", "pets", anything you can think of that classifies your content. With Terms to classify your content, you can easily organize it. For example, you can create a menu item called "News from the Pet World", which is set up to display any nodes that have the Terms "news" and "pets" attached – i.e., the articles you've written about pet-related news.
  • Vocabulary: A Vocabulary is a number of Terms grouped together for convenience. For example, you might have a Vocabulary called "Product Type", containing Terms like "sweater", "jacket", "socks", etc., for use with any node that describes a product.
  • Category: This is a confusing word: some Drupal documents say it means the same thing as Taxonomy, others seem to equate it with Vocabulary. Fortunately, it seems to be dropping out of use, and you may never come across it. This text will avoid it and stick to the words that Drupal is clear on: the "Terms" that act as tags for your nodes, and the "Vocabularies" that are groups of Terms. (But just to keep things complicated: to set and edit your Terms and Vocabularies in Drupal 5, you need to visit a form titled "Categories". Drupal 6 more sensibly labels this form "Taxonomy".)

Here's a short summary that puts those words into their places:

We're going to discuss Taxonomy, the use of "keywords" or "tags" to classify and organize your content. Instead of those popular words, though, Drupal calls keywords or tags Terms. It calls a group of related Terms a Vocabulary. So we'll talk mostly about Terms and Vocabularies. (We'll avoid Drupal 5's superfluous word categories.)

Got that? Good!

Ready-made tags: node types

Let's note from the start that all your content already has a built-in tag of sorts: its node type – Page, Story, Blog entry, etc. (I'm calling this "tag", not "Term", because Drupal doesn't technically treat node type as a Term.)

So even if you stop reading here and create or use no Terms, you're already classifying content in at least one way, and can organize it based on node type. For many sites, that simple organizational ability will be enough. Just use Blog entries for, say, news; Stories for product info; Pages for company info; and so on. Set a 'news' menu item to call up all Blog entries, a 'products' menu item to call up all Stories, and so on. There you go: simple organization for a simple site. See Linking to Content for more.

A site of even moderate size or complexity, though, will quickly outgrow that scheme. If you'd like to explore a deeper way to organize content, read on.

Setting the Terms

Here's where to find our form for playing with Terms:

Navigation » Administer » Content management » Taxonomy

(In Drupal 5, that last part is "Categories", not "Taxonomy".) 

The 'List' tab

The list you see under this tab is a list of Vocabularies. The three columns in the list:

Name

The name of the Vocabulary.

Type

This isn't a "type" of Vocabulary itself. Rather, this displays the node types that can use each Vocabulary.

For example, if you have a Vocabulary which you've named "topic", and this Vocabulary happens to list "Page, Story" under 'type', then that means only Page and Story node types can be tagged with Terms from the Vocabulary named "topic". Others, such as Blog Entry nodes, can not use the Terms from "topic".

Operations

Things you can do with the listed Vocabulary. See details below.

The 'Add vocabulary' tab

Before you can create and use Terms, you need to create one or more Vocabularies to hold them. If that's not already done for you on your site, read on. Here's what you see on the 'Add vocabulary' form:

Vocabulary name

The name of the Vocabulary. It will appear on the list of Vocabularies, and on forms for creating content (for any content types that can use the Vocabulary).

Description, Help text

Optional extra information. 'Help text' can be useful for telling users how you want them to use the Vocabulary, but otherwise, you can feel free to ignore these items.

Content types

As discussed above, you decide what node types can use this Vocabulary. This is where you decide, by checking the boxes of the node types. 

For example, if you are creating a Vocabulary called "Product Category", and know that you only want to use its Terms with Page nodes (the node type you plan to use for your product info listings), you should check only 'Page'.

If unsure, check everything! If you're the only one entering content, there should be no harm. But if you're allowing others to create content on your site, put a little thought into it. For example, you may be allowing others to post Blog Entries on your site. Do you want to allow them to tag their entries with Terms from your "Product Category" Vocabulary, or not? This is the time to decide.

Settings (Drupal 6)

Here's a handful of options to customize how your Vocabulary works. (If you're using Drupal 5, see Hierarchy (Drupal 5) below.)

Tags: This option would be better named "Free tagging", not simply "Tags". It lets you freely tag content with whatever Term(s) you like, instead of choosing from a ready-made list. With this option enabled, you create a new Term, or use an existing one, by simply typing it into the text field Drupal provides. (You can enter multiple Terms by separating them with commas.)

This on-the-fly input is a good choice for content that requires an unpredictable or growing set of Terms. One example: You're creating a site that posts celebrity gossip. You'd like to tag each node with the discussed celebrities' names, but there are far too many to include in a list (and they keep breeding, too). On-the-fly Terms may be the perfect solution.

Multiple select: Another useful option. A node can always take a Term from each of separate available Vocabularies, but checking this option allows a node to use multiple Terms from the same Vocabulary. For example, say a single Vocabulary contains Terms that include "machinery" and "books". With the multiple select option enabled, a product listing for a machine repair manual could be tagged with both "machinery" and "books" from that Vocabulary. The result: A page that listed products tagged with "machinery", and a page that listed products tagged with "books", would each display this particular product.

If you're using free tagging (the "Tags" option above), you automatically have the ability to tag content with multiple Terms from this Vocabulary, and can ignore "Multiple select".

Note: When you create a node and choose multiple Terms from a Vocabulary, selecting the second Term will only un-select the first. You need to hold down your computer's "mutiple select" key (Command for Macs, Ctrl for Windows machines) when making the second and later selectons.

Required: You're normally free to tag a piece of content with no Term from a given Vocabulary. But not if this setting is checked! You won't be able to submit the node without selecting a Term (or inputting one if using free tagging). This is a useful setting when you are allowing others to submit content, and want to enforce tagging.

Hierarchy (Drupal 5)

There are several choices under this heading (not all of which are really connected to hierarchy):

Disabled, Single, or Multiple: Just as menu items can have "child" sub-menus, your Terms can have "child" sub-Terms below them.

If you select 'Disabled', that won't be the case for this Vocabulary; it will have one "flat" level of Terms beneath it.

If you select 'Single', you can have child Terms, even in multiple layers. For example, your "Product Category" Vocabulary may have the Terms "tools" and "machinery" – and under "machinery", more specific child Terms like "pump", "generator", and "purifier".

More layers are possible. Your child Term "purifier" might have "filtration", "reverse osmosis", and other purifier types below it, as "grandchild" Terms.

If you select 'Multiple', a child Term can appear under more than one parent Terms. For example, you could have the Term "lathe" appear as a child under "tools", and appear as a child under "machinery". Just select as many parents as you like when creating the Term (for the second and later Terms, use your computer's "mutiple select" key: Command for Macs, Ctrl for Windows machines).

With multiple parent Terms selected, the new child Term will appear separately under each parent. It's still a single "instance" of the Term, though; if you pick one of the Term's appearances for modification or deletion, you'll modify or delete all its appearances in that Vocabulary.

What's the point of these hierarchies? In addition to general orderliness in your Vocabulary, you can make use of useful techniques, such as a single link that returns all content tagged with the parent Term and its child Terms. For example, you can create a link returning content tagged with machinery", or any of "pump", "generator", and the other child Terms below it. That link will catch any nodes dealing with machinery products, even a node only has the Term "pump" and not "machinery". See Creating Links.

Free tagging: This is the same as Tags under Settings (Drupal 6) above.

Multiple select: This is the same as Multiple select under Settings (Drupal 6) above.

Required: This is the same as Required under Settings (Drupal 6) above.

Weight

This will determine the placement of the Vocabulary on the list of Vocabularies – a matter of very little importance. Feel free to ignore it.

Editing a Vocabulary

Clicking 'edit vocabulary' on the list of Vocabularies takes you to this form. It's the same as the form for adding a Vocabulary; see full procedures above.

Listing terms

At long last, we get to the meat of your Vocabularies: the Terms contained within. Clicking 'list terms' on the list of Vocabularies shows you two things: a list of the included Terms, and a link to add more Terms (see below).

The list of Terms has two columns, 'Names' and 'Operations'. The latter only holds a link to edit the Term. The former is more useful than it first looks: each Term's name in the list contains a link that calls up all content tagged with that Term. This will come in handy when making menu items and other links that call up content based on Terms. See Content Paths and URLs and Linking to Content.

Adding terms

The final item to cover, and an important one, is the tool to create new Terms.

Clicking 'Add term' switches to an 'Add term' tab. Here's what it offers:

Term name

The name of the Term: "products", "news", "general info", "France", whatever you want.

Description

Type in some info on the Term, or its intended use, if you wish. It's generally not important.

Parents

Here you have the option of creating a "hierarchy" of Terms, by placing a new Term under a "parent" Term (assuming there's already at least one Term in the Vocabulary). Pick '<root>' to place the Term at the "top level", with no parent Term. Or pick an existing Term to place your new Term under it as a child Term.

Under Drupal 5, you have to first enable the ability to create this hierarchy. See Disabled, Single, or Multiple under Hierarchy (Drupal 5) above.

Related terms

The usefulness of this feature isn't yet clear. Ignore.

Synonyms

The usefulness of this field isn't yet clear. Ignore.

Weight

If it matters to you, you can use "weight" to set the Term's location inside the Vocabulary. A "light" (negative) weight will place it higher on the list; a "heavy" (positive) weight will place it lower. Many admins won't consider this important.

Tagging content

Now that you've got Terms, what to do with them? Simple: when you create content, you'll see Terms listed under 'Vocabularies' ('Categories' in Drupal 5) on the node's edit form. Each available Vocabulary will appear as a separate list (or as a text input field if the Vocabulary uses free tagging). From each Vocabulary, pick whatever tags you want to attach to that node (or input tags if the Vocabulary uses free tagging). This is briefly described under the heading Vocabularies ("Categories" in Drupal 5) on Create a Page Node.

Once content is tagged with Terms, you'll be able to perform tricks with those Terms. See Content Paths and URLs and Linking to Content.

  • 6 comments
  • Quote

Drupal and the New Paradigm for Content Management

  • taxonomy

A theoretical look at what taxonomy means for Drupal. Good reading if you know something about CMS but are a newbie to Drupal itself.

The Power of Drupal Categories

  • taxonomy

Categories = taxonomy, terms, vocabulary, tags, keywords; that stuff. One of Drupal's strongest features, and often a puzzle for newbies. Any resource to help here is a great thing!

Learn Drupal, hands-on

Get the beginner-friendly ebook that teaches community site building via a live case study.

Drupal 6 Ultimate Community Site Guide

Read the review

Drupal mini tip

Want a quick redirect, without manhandling system files? Just use the core Path module: on the "URL aliases" form (/admin/build/path), complete 'Path alias' with the path you expect visitors to use, and complete 'Existing system path' with the path you'd like to send them. 'Path alias' can be an existing system path; Drupal will still treat it as an alias and send visitors to your specified path.

It's a deal!

Dreamhost dealsDrupal Ace presides over his domain, proudly ensconced in his DreamHost eyrie. Won't you join me?

Promo code deal!

Just enter the code 49ER when you register for an account, and save $49 off the already-low price. No strings!

Read my hosting service review

Powered by Drupal, an open source content management system

Copyright 2007 and forever after. Made with Drupal, of course. On OS X, of course. Served up by DreamHost. DreamHost

RoopleTheme