- home
- wiki
- moblog
- about
- fun stuff
- dj
- dvds
- books
- recipes
- siteinfo



Warning: fread(): Length parameter must be greater than 0 in /home/gblake/include/blogroll.class.php on line 21

Warning: Invalid argument supplied for foreach() in /home/gblake/include/blogroll.class.php on line 40
Powered by Bloglines

< Movable Type 3.1 Released | Main | QOTD 09/01/2004 >

August 31, 2004

MT 3.1 Subcategories

Movable Type 3.1 lets you now have subcategories, something that I'd kind of been wanting for a while. I'm currently using them and you can see some of the groupings of categories I have to the right. The code is after the 'more' link.

  <div class="right-text">
  <MTSubCatIsFirst><ul <MTHasNoParentCategory>class="open parent"</MTHasNoParentCategory>     <MTHasParentCategory>id="ul_item<MTParentCategory>
    <$MTCategoryID$></MTParentCategory>" class="closed"</MTHasParentCategory>>     </MTSubCatIsFirst>

  <MTHasNoParentCategory> id="item<$MTCategoryID$>"</MTHasNoParentCategory>
  <MTHasParentCategory> id="item<MTParentCategory><$MTCategoryID$></MTParentCategory>
    <MTHasSubCategories>[<a onclick="toggle('item<$MTCategoryID$>');">+</a>]
  <a href="<MTCategoryArchiveLink>"><MTCategoryLabel> (<MTCategoryCount>)</a>

If you view the source for this page you can see what it creates (along with the javascript it runs). There is documentation for this as part of the MT 3.1 documentation (also viewable here). If you are looking for other examples of the subcategories, you could start by checking out David Raynes' SubCategories, since the Movable Type 3.1 subcategories are based on his plugin. (Of course in the midst of typing this I realized I'd been talking to David earlier today on #joiito. Small world!)

Posted by snooze at August 31, 2004 07:30 PM


Post a comment

LJ Users: You can now sign on via openID. Please enter the URL to your LiveJournal in the following space. For example, http://www.livejournal.com/users/yourLJnamehere.

Thanks for signing in, . Now you can comment. (sign out)

(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.)

Remember me?