IfArchiveType
Type: block
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- The archive type to test for, case-insensitively. See ArchiveType for acceptable values but note that plugins may also provide others.archive_type- A synonym fortype
Example
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="Recent Entries" href="<$MTLink template="Entry Atom feed"$>" />
<mt:else>
<link rel="alternate" type="application/atom+xml" title="Recent Entries" href="<$MTLink template="feed_recent"$>" />
</mt:IfArchiveType>

Leave a note