<mt: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>
Gautam Patel
April 2, 2010 6:03 AM | Reply
Note: The type modifier appears to be case-sensitive. I've found that type="category" does not work, but type=Category does.
Also, the <mtelse> apparently works this way too:
This needs to be confirmed.
Gautam Patel
April 2, 2010 6:14 AM | Reply
Correction.
is not correct.