<mt:ParentCategory>

A container tag that creates a context to the current category’s parent, if category is assigned a parent category.

Example ΒΆ

List all the categories and link to parent category if category in context has a parent category:

<ul>
<mt:Categories>
    <li>
    <a href="<mt:ArchiveLink>"><mt:CategoryLabel></a>
    <mt:ParentCategory>
        (Parent Category: <a href="<mt:ArchiveLink>"><mt:CategoryLabel></a>)
    </mt:ParentCategory>
    </li>
</mt:Categories>
</ul>

block, category, template tag

This page was last updated on 2009-11-13, 18:37.

1 Note

To display contextual ads for entries depending on the categories, you can use the code snippet below in the entry archive template. Do not forget to create a category custom field "Contextual Ad" .

set the primary category ad










set the parent category ad







output the contextual ads

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.