tips and tricks for movable type

preventing links to empty category pages
December 03, 2002

In this thread, Eduardo wanted to know how to list all the category archives in his blog, without having a link to the archive page if there were no entries in the category. We tried lots of things, and I finally found a PHP solution.

But Kevin Shay's new Compare plugin did the trick as well.

First, of course - install the plugin.

<MTCategories show_empty="1">
<p><b><MTIfNotEqual a="[MTCategoryCount]" b="0" numeric="1">
<a href="<$MTCategoryArchiveLink$>">
</MTIfNotEqual>
<$MTCategoryLabel$>
<MTIfNotEqual a="[MTCategoryCount]" b="0" numeric="1">
</a>
</MTIfNotEqual>
</b> (<$MTCategoryCount$>)</p>
</MTCategories>

Whoomp! There it is!

Comments

Whoomp!

Thanks (again), Girlie!

by Kevin | 08.09.03 11:55 AM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 0
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/119)