<mt:SubCategories>

A specialized version of the Categories container tag that respects the hierarchical structure of categories.

Attributes:

  • include_current

    An optional boolean attribute that controls the inclusion of the current category in the list.

  • sort_method

    An optional and advanced usage attribute. A fully qualified Perl method name to be used to sort the categories.

  • sort_order

    Specifies the sort order of the category labels. Recognized values are "ascend" and "descend." The default is "ascend." This attribute is ignored if sort_method has been set.

  • top

    If set to 1, displays only top level categories. Same as using TopLevelCategories.

  • category

    Specifies a specific category by name for which to return subcategories.

  • glue
This page was last updated on 2008-07-07, 14:25.  

2 Notes

To create a "breadcrumb" style title using subcategories you can use the following code:

<MTHasParentCategory>
<MTParentCategories exclude_current="1">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTParentCategories>  Â»
</MTHasParentCategory>
<$MTArchiveTitle$>

There's a bug in the way categories sort, although I can't find the bug report page (I can find the bug report page for 3.3, but not for 4.)

In the MT Admin Interface categories sort in a case insensitive way. When output to template, the categories sort in a case sensitive way.

This means, that if this is what I see in my interace: Animal Bumble Bee cat Dog emu Frog

when I output a list of categories (in my case using ) I get:

Animal Bumble Bee Dog Frog cat emu

Leave a note

Have a question, please use the MT Forums. Notes sumbitted here should pertain to tips & hints regarding documentation.