Skip to main content

Tag clouds and/or categories

Tags allow for filing content by keyword. In general, the concept of tagging blog posts can be applied in two ways, either by using tags as freestyle labels or as predefined categories. The freestyle approach has the advantage of not requiring a lot of organization or planning ahead. Tags are simply thought up and attached to posts as needed. The price to pay for this method, however, is eventually ending up with a large amount of tags, often being synonymous for each other or referencing not more than a single post.
Predefined categories in contrast work exactly the other way around. Instead of assigning keywords to posts, posts are assigned to already defined keywords. Categories give better structure, but also require an ability to abstract.

The good news about tagging content in Drupal is, that the CMS supports both of the above mentioned styles directly out of the box through it's taxonomy module. The bad news, however, is that Drupal does not make a clear distinction between them. It is left to the user to decide how to employ the taxonomy system and to bring up the discipline of sticking to the chosen method.

The first step in setting up a tag cloud is to configure the taxonomy module (admin/content/taxonomy). Taxonomy can be a bit confusing for first time users, because, as already mentioned, it does not make a distinction between freestyle and category tags. Instead, what it does is to define and manage containers, called "vocabularies", that will hold "terms" and can be configured to function in either way (or both ways, when not paying attention).
Start by adding a new vocabulary, that will be used exclusively for blogging and name it appropriately (e.g. "Blog posts"). Enable this vocabulary for all the content types, which are suppose to be used for blogging (in regards to the methodology section, all content types that are promoted to the frontpage). Make sure to check the "Required" checkbox under "Settings", to prevent untagged posts from being published. Allowing untagged posts essentially means to loose track of them when they are pushed back on the frontpage. The settings panel is also where to configure the vocabulary for freestyle tagging or category use by checking the "Tags" checkbox. The difference is, that node edit forms will either feature a textfield or a listbox to submit tags.

The taxonomy module itself will only allow for tagging content and listing all the nodes that are associated with a certain tag. It will however not actually provide a tag cloud. For this, the tagadelic and cumulus modules are needed. Cumulus will show the tag cloud as a flash animation with rotating keywords, while tagadelic serves as it's backend and fall back solution in case a visitor does not have flash installed.

Bloggers, who are more into categories, might be interested in installing Taxonomy VTN and Taxonomy Menu instead. Taxonomy VTN provides a glossary style listing of categories, Taxonomy menu can be used to display categories in a block on the sidebar.

Using both concepts at the same time is possible as well. It is advisable though, to create two separate vocabularies in this case.