Error message

Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in require_once() (line 915 of /var/www/

Administering taxonomies

Administering taxonomies is fairly straightforward but there is a lot to learn. The Drupal handbook section on taxonomy has a great overview, so this will be a little summary.

Taxonomy is the art of classifying things. As they say "lets you classify content into categories and subcategories, thus organizing the content on your site".

There are two levels to the classification system. The vocabulary can also be thought of as a category. A vocabulary holds terms, and your site can have as many vocabularies as you want. Each vocabulary can have as many terms as you want. Terms are unique within a vocabulary however the same term name can appear in multiple vocabularies. So, what's a term? A 'term' is the smallest unit of categorization.

For example one could have a vocabulary for music styles. The terms in the music styles vocabulary could include: Baroque, Classical, Gregorian Chant, Jazz, Hillbilly, Blues, etc. If you had another vocabulary for building architectural styles, it could also include a term name 'Classical'. The 'Classical' in the architectural style vocabulary is different from the 'Classical' in the music style vocabulary.

Once the Taxonomy module is enabled the 'Categories' choice appears on the administration screen.

The attributes of a vocabulary include

  • Vocabulary name is what's shown to the user to describe the vocabulary
  • Node types selects which nodes the vocabulary can be applied
  • Hierarchy selects whether the vocabulary can structure the terms in a tree-like hierarchy where some terms can be children of other terms
  • Related terms selects whether you can specify terms that are related to a given term. It's not known just what the effect of this is
  • Free tagging allows the user to define new terms while creating a node. If Free tagging is not set then the terms in the vocabulary are predefined by the administrator. If it is set the terms in the vocabulary can be defined at any time.
  • Multiple Select allows a node to have multiple terms from the vocabulary
  • Required makes it so the user must select a term from the given vocabulary

Once a vocabulary is defined you should some add terms. The attributes of a vocabulary term are basically the term name and its description.

The Taxonomy Manager module offers excellent management capabilities for the taxonomy system. It uses a lot of AJAX features to make managing taxonomy more dynamic and immediate. With it you can easily rename terms (in case there's a misspelling), merge the content of two terms, edit the parentage of a term, and more.

Taxonomy Switch offers some editing which Taxonomy Manager skips over. They ask: Have you ever come to the exasperating conclusion that one of your taxonomy terms was really put in the wrong vocabulary and you would like to move it into another one? Yes, I have, but they say it's a pain to add the terms to the desired vocabulary, and delete them from the other. I'm not sure I understand the pain here. But I haven't tried the module.

The Taxonomy import/export via XML module allows offline editing of the taxonomy. You can export the taxonomy system as an XML file, change it, and reimport it. Or I suppose you could do other things with the XML file.