SubCategories v0.3

Thanks to some updates from Bjoern Graf, the following has been changed:

  • Bugfixes:
    • Fix in the builtCatHeir method
    • Fixed bug in MTParentCategory: problem picking up on category in a category archive
    • Fixed bug in MTEntriesWithSubCategories: misbehavior when used in category archive
  • New tags:
    • MTHasSubCategories: conditional tag that returns true if the current category has categories beneath it
    • MTHasParentCategory: conditional tag that returns true if the current category has one or more categories above it

Enjoy!

6 TrackBacks

  如果说MT还有什么不足的话,最让人遗憾的可能就是文章还不支持多级分类。   网上已经有很多人在尝试编写多级目录的分类的插件,如今最流行的好像就是David Raynes写的SubCategories。1æ... Read More

The big link dump to make up for missing a week. Read More

The big link dump to make up for missing a week. Read More

MT Subcategories from Ramblings of a Code Monkey on March 13, 2004 9:56 AM

For a variety of reasons, I'm going to attempt to implement David Raynes's Subcategories plugin. This should hopefully make it easier for me to provide some of the RSS feeds here that aren't just for a single category. Hopefully, this... Read More

一週間ほど前に、indexページのCategory Archiveのリストを、主カテゴリーと副カテゴリーにツリー化してくれるプラグインSubCategories v0.3を導入した。やり方は、なかよしこよしさんの「MTで主ã... Read More

〓〓〓〓違〓〓潟〓〓贋〓〓〓〓〓〓br /> http://www.rayners.org/2004/01/21/subcategories_v03/index.php

篁〓〓罧級〓〓с〓綽〓〓〓〓〓ã€...

Read More

10 Comments

I still have the same problem with parent categories in two different weblogs having the same name - when rebuilding one weblog, MT looks in both weblogs for the subcategories of the parent, resulting in 'category not found' errors.

I'm starting to wonder if it's just me!

Maybe it's a silly question, but why isn't this plugin listed in the MT Plugin Directory? I like to handle all my installs through your plugin manager...

I realize an answer may require either speculation or divulging classified information, but will David Raynes Subcategories (TM) be forward-compatible with the hierarchical categories that have been mooted for MT3?

Question regarding to the conditional tags, do they work with tags?

Question regarding to the conditional tags, do they work with <MTElse></MTElse> tags?

That's my question too (so far I haven't been able to make them work). The task I wish to achieve is to show the MTCategoryCount only on those subcategories that have NO further categories underneath them.

David: how can those using Berkeley DB delete parent/child relationships from the plugindata table? I accidentally made a parent into a child (what an image!) and there's no clear way to change this...

David: When I create a new category and make this newly created category a parent of some of the existing categories, everything works except the newly created category's hyperlink. I guess this is due to the fact that the parent-child relationship between categories are "external" to an entry. Any fixes in the works to tackle this problem? Thanks.
-Ninad

This is just what I was looking for. Thanks.

I just have 2 questions. First, is there a way to count the number of entries in both the Main and corresponding subcategories so that:

Category 1 (5) but have the subcategories grouped together like this:

Category 1
>>links

Category 2
Sub Category 2.1
>>>links
Sub Category 2.2
>>>links

Category 3

I can't seem to find the place where I can place the

and
codes so that it will work. maybe you can make a type tag to allow for more customization?

Anyway, minor points. This script is awesome. Thank you so much!

Hi, I have another problem.

I have all the Categories listed and underneath them a link to the individual pages. But for the main categories, it would list all the individual pages including the ones in the subcategory.

Leave a comment

Recent Entries

  • Plugin Writing 101

    So, I’m planning on writing up some entries about various aspects of plugin development. While I have a couple topics already in mind, I thought...

  • The Olympics Make Me Want To Compete Again

    Every time the Olympics come around (most the summer ones) I always start to delude myself into thinking I could complete once again in the...

  • Minimalist plugins are fun!

    Last night I whipped up one of the smallest plugins I’ve ever written. It is so small in fact that I was able to stuff...

  • Feedburner Widget on MT News

    Movable Type News A WordPress 2.5 Upgrade Guide: And of course there are lots of third-party plugins for the MT dashboard, to integrate statistics and...

  • AD&D Monster Stats for the Presidential Canditates

    Charles Stross (scifi author, D&D nerd, and former perl columnist) posted Politics as she is Played with 3d6: The recent death of Gary Gygax, who...

Close