Articles about the Drupal content management system (www.drupal.org).

Category Listings in Drupal 6


In case you haven't noticed, I upgraded my web site to Drupal version 6 over the weekend.

The biggest challenge of Drupal version upgrades is making sure your theme and modules make the transition. The APIs can change radically between major releases. That means your add-on components won't survive the upgrade unless their maintainers are actively supporting them.

That's why, for instance, this site is running under a simple, barebones theme. The theme I was using hasn't been updated for version 6, so I had to leave it behind.

As far as modules, only one of my add-on modules wasn't available for version 6—and it's one I wrote myself.

I write a module called category_listing that provides a simple, themed list of taxonomy terms. It's what I used to produce my blog categories page.

The enhanced views module comes frustratingly close to providing this capability. I found two limitations.

Drupal Teaser Rate Link


Last December, I published a patch to the Drupal Fivestar module that adds a "rate this post" link at the bottom of article teasers, such a syou see on the front page of my blog. As I explained at that time, the intent is to let people know they could rate the post and to encourage them to click through to access the ratings widget.

I'm pleased to report that as of release 5.x-1.12 of the module, the patch is no longer necessary. The maintainer has incorporated that functionality into the module.

To enable the link, go to:

Administer -> Content management -> Content types

Then, edit the content type of interest, such as story or blog.

Finally scroll down to the "Fivestar ratings" section and set the "teaser display" setting to "Teaser link to full node widget". That will enable the "rate this post" link on teasers of the selected content type.

Drupal Category Listing Module


I was feeling pretty dumb. I migrated my blog from Movable Type to Drupal back in December. One of the things I lost in the move was a category index. I couldn't find a good way to get Drupal to give me a basic listing of category terms in a given vocabulary.

Here is what I wanted:

  • List taxonomy terms in a given vocabulary
  • Displayed vocabulary hierarchies properly
  • Optionally displayed category descriptions and article counts
  • Linked the term name to taxonomy/term/(tid)
  • Displayed in a properly themed unordered list

These requirements are so basic and obvious, I thought the module that did them had to exist. I was feeling like a big dummy for not figuring out where it was—either in the Drupal core or among the large number of freely available taxonomy modules.

Syndicate content