<MTEntries> tag in Movable Type has a
attribute, which lists the 'N' most recently commented on entries. However, this attribute
does not work in category archive pages - MT ignores the attribute in that case and will
list every entry in the category.
At first, I thought this was a bug, but after doing some searching through the
MT Forums, I discovered that the
recently_commented_on attribute has always behaved this way - it was never
designed to work in a category archive.
The typical solution is to use a separate index template containing the
recently_commented_on attribute, and use a PHP or SSI include to insert
the recently commented on entry list into a category archive page. This weblog does
not use PHP, and only my blog's main page is set up for SSI, so I preferred a solution
that did not require PHP or SSI.
Using Brad Choate's SQL plugin, I
created an SQL query that lists recently commented on entries for whatever category
is in context on a category archive page.
Here's the code I'm using in my category archive templates: