MTSubCategory of MovableType

I have so many articles, so I finally spent some time to create a category page for top level categories, middle categories, and subcategories. You may have noticed the change of the my homepage (look at this screenshot).

screen-category.wangjianshuo.com.png

Screen shot of the category function of Wangjianshuo’s blog

For those bloggers using MovableType, here are code I used to create a page like that:

<br><div class=”so”><b>Categories</b></div>

<div class=”ct”>

<div class=”category”>

<style>

.category div{float:left;width:32%;padding-bottom:20px;}

.category b {background-color:lightyellow;padding:3px;margin:3px}

</style>

<$MTTopLevelCategories$>

<div><b><a href=”<$MTCategoryArchiveLink$>”><$MTCategoryLabel$></a></b><br>

<MTSubCategories>

» <a href=”<$MTArchiveLink$>”><$MTArchiveTitle$></a> <small>(<$MTCategoryCount$>)</small><br>

<MTSubCategories>

      <a href=”<$MTArchiveLink$>”><$MTArchiveTitle$></a> <small>(<$MTCategoryCount$>)</small><br>

</MTSubCategories>

</MTSubCategories>

</div>

</MTTopLevelCategories>

<br style=”clear:both” />

</div>

</div>

I didn’t use the MTCatRecurse tag, since I only want to list the first 3 level of the category and I want some diversity in the top level, second level and third level…

Hope this helps. (For regular readers who do not care about how this blog works, please simply ignore this entry).

1 thought on “MTSubCategory of MovableType

Leave a Reply

Your email address will not be published. Required fields are marked *