<mt: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>
Related ¶
This page was last updated on 2009-06-23, 19:32. [Edit]

Leave a note
Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.