This was useful to me, so I thought I’d share. I’ve been trying to assign all my entries to categories – while all new entries since May (or thereabouts) were assigned categories when they were published, older entries were not. Over the past few months, when I’ve had the inclination, I’ve been trying to add categories, to posts, but I’m finding it increasingly hard to find entries lacking a category, and there seems to be no way in the MT interface to just show category-less entries.
But, I have a solution, and this is how I did it. If you want to do this yourself, head over to Brad Choate’s site and download the MTIfEmpty plugin and install it, then, create a new index template and copy and paste the following code:
<html> <head> <title><$MTBlogName$> - Posts with no category</title> </head> <body> <h1>Posts with no category report</h1> <ol><MTEntries lastn="1000"> <MTIfEmpty var="EntryCategory"> <li><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a> - <a href="<$MTCGIPath$>mt.cgi?__mode=view&_type=entry&id=<$MTEntryID$>&blog_id=1"></a></li> </MTIfEmpty></MTEntries></ol> </body> </html>
This will generate a report
<MTIfEmpty var="EntryCategory"> with
<MTIfEmpty var="EntryExcerpt"> to get entries without excerpts, or
<MTIfEmpty var="EntryKeywords"> for entries sans keywords. You get the idea.
The plugin, while not sounding very interesting, is actually immensely useful. Thanks Brad!
Update: note to self – escape blocks of HTML before posting code samples. 😮