Wednesday January 18, 2006

Excluding Categories in Movable Type

We wanted to be able to post "draft" weblog articles, accessible for review by a selected audience but not publicly available to the world yet. We wanted to exclude one or more named categories from all indexes and lists; however, we also wanted to ensure that the "excluded" articles could be found by direct URL to their "Individual Archive" pages.

We use Movable Type which has many useful plugins available, including quite a few choices for handling categories. That's the good news.

The bad news is that none of the category plugins handles every case. We succeeded, but it took several plugins to do it. We installed:

  • MTCatEntries — displays entries including or excluding categories you specify. In addition to allowing you to exclude categories, CatEntries correctly displays N entries when given a lastn="N" attribute.

  • MTFilterCategories — Allows for easy filtering of category listings to include or exclude certain categories. Not for MTEntries containers.

  • Compare Plugin — implements a set of template tags for displaying a portion of a template conditionally, depending on the results of a comparison between values. We're using the MTIfNotEqual tag.

View the code samples...

Excluding Categories in Movable Type ( in category WebTech ) - posted at Wed, 18 Jan, 10:23 Pacific | «e»