Not a developer? Go to MovableType.com

Documentation

HasNoParentCategory

Returns true if the current category does not have a parent category.

<mt:Categories>
    <mt:HasNoParentCategory>
        <$mt:CategoryLabel$> has no parent category.
    </mt:HasNoParentCategory>
</mt:Categories>

This type of conditioning can be done with the mt:IfCategory tag as well.

Example

List categories and note if each has a parent or not:

<ul>
<mt:Categories>
    <li>
    <mt:HasNoParentCategory>
        <$mt:CategoryLabel$> has no parent category.
    <mt:Else>
        <$mt:CategoryLabel$> has a parent category.
    </mt:HasNoParentCategory>
    </li>
</mt:Categories>
</ul>
Back

Leave a Comment