IfArchiveType
This tag allows you to conditionalize a section of template code based on whether the primary template being published is a specific type of archive template.
Attributes:
- type
- archive_type
The archive type to test for, case-insensitively. See ArchiveType for acceptable values but note that plugins may also provide others.
If you wanted to include autodiscovery code for a customized Atom feed for each individual entry (perhaps for tracking comments) you could put this in your Header module. This would serve up the first link for Individual archives and the normal feed for all other templates:
<mt:IfArchiveType type="individual">
<link rel="alternate" type="application/atom+xml"
title="Comments Feed"
href="<$MTFileTemplate format="%y/%m/%-F.xml"$>" />
<mt:Else>
<link rel="alternate" type="application/atom+xml"
title="Recent Entries"
href="<$MTLink template="feed_recent"$>" />
</mt:IfArchiveType>

Leave a note