Taxonomy Notes, Drupal Camp Dallas, August 2009

On August 1, 2009, I was privileged to give a talk on Taxonomy at Drupal Camp Dallas. Here are some minimalistic notes of what I presented, as well as a list of important taxonomy related modules.

Leave a note in the comments if you have a question about these notes. These aren't meant to be detailed instructions, but only brief notes.

Taxonomy

Taxonomy basically means: classification, categories, tags, and naming. It is a system of classifying things.

That's what it means in Drupal too. The taxonomy system exists to help you organize your content and make it easier for site users to find things in your site.

Words and Meanings

  • Taxonomy is the system.
    • Vocabulary is the facet (color, size, etc.).
      • Term is the category or tag (green, small, etc.).
        • Nodes are what terms are applied to.

Nice utility modules

  • Pathauto - can automatically create visible URLs that reflect a node's taxonomy.
  • Automatic Node Titles + Token - Token module enables taxonomy terms to be used in various places throughout your site. Automatic Node Titles gives you the option of automatically naming your nodes based on taxonomy terms as well as many other things.

Making menus

I'm using the term "menus" loosely because most of these methods don't affect Drupal's menu system. They make clickable lists of terms, which to the end user looks the same.

  • Taxonomy Menu - makes a normal Drupal menu from terms of a vocabulary. The best place to start if you just want a normal menu of taxonomy terms.
  • Views - you can make a view that lists terms linked to their pages (/taxonomy/term/%). Create a block display to present them in a block, and boom, you've got a taxonomy menu.
    • A more advanced way is to create a listing of nodes, with an argument of taxonomy terms. Select "show summary" as default argument, and that creates a taxonomy menu on a page.
  • Faceted Search - enables a new search form on your site, with additive filtering, not only by terms of various vocabularies, but also by content type, author and more.

Listing nodes

The other common need is to customize the display of nodes when you're viewing the list of nodes for a term. It's what you see normally after clicking a term or tag. I'll refer to this page as the "Taxonomy Term Page"

  • Views (again) - provides a view (or list) that overrides Drupal's default taxonomy term page. Just enable it, then customize what it shows.
  • Views + Panels - example: create a view with three "content panes" (enable the "Views content panes" module) that each display a different content type, and use a taxonomy argument. Panels (like views) provides a display that overrides Drupal's default taxonomy term page. Enable that panel, place these three views displays in their own panes. When adding each display, be sure to select the "context" for the term. (That will make more sense once get in there and work with it.)

Managing taxonomy

  • Hierarchical Select - not only makes it easier to select from a large hierarchical vocabulary, but also adds options regarding the levels of terms.
  • Taxonomy Manager - eases the management of terms and vocabularies when you have a LOT of terms or need to combine two vocabularies into one.
  • Taxonomy Other - allows users to add terms to a non-tagging vocabulary directly on the node-edit form.
  • Views Bulk Operations - enables you to add terms to nodes in bulk.

More

  • Taxonomy Hide - lets you specify certain vocabularies to hide when displaying with a node in full or teaser view. This is nice for when you're using one vocabulary (e.g., "Section") to form a main menu, and you only want to show freetagging tags with the actual node.
  • Acquia Marina Theme - check out the theme settings of this. Allows hiding of specified vocabularies, like Taxonomy Hide, but with much more detailed control.
  • Taxonomy Access Control or Taxonomy Access Control Lite - Two distinct node access control modules that use taxonomy terms to help define who has access to which nodes.

  • These and more taxonomy-related modules are listed in the taxonomy section of the drupal.org

Slides from my talk are available on slideshare

I hope this has been helpful to you. Please leave a comment and let me know your thoughts.