EntryLink
Outputs absolute URL pointing to an archive page related to the the current entry in context.
When used without the archive_type
attribute, a link to the entry permalink (individual) will be output… same as if the <$mt:EntryPermalink$>
was used.
Link to the main category archive of the entry in context:
<a href="<$mt:EntryLink type="Category"$>"><$mt:EntryCategory$></a>
If the same archive mapping type is used more than once in the same blog, a url to the preferred archive will be output.
Note: The preferred archive can be selected by selecting the checkbox next to the archive mapping type in the Template Options for the template you wish to be the preferred template.
Attributes
archive_type
Identifies the archive type to use when creating the link.
Valid archive types are case sensitive:
- Individual (default value)
- Daily
- Weekly
- Monthly
- Yearly
- Author
- Author-Daily
- Author-Weekly
- Author-Monthly
- Author-Yearly
- Category
- Category-Daily
- Category-Weekly
- Category-Monthly
- Category-Yearly
type
Alias of archive_type
.
Examples
Link to the main category archive of the entry in context:
<a href="<$mt:EntryLink type="Category"$>"><$mt:EntryCategory$></a>
Link to the appropriate Monthly archive for the current entry (assuming Monthly archives are published), you can use this:
<a href="<$mt:EntryLink type="Monthly"$>"><$mt:EntryDate format="%B %Y"$> Archives</a>
Link to other entries by the current author (assuming Author archives are published):
<a href="<$mt:EntryLink type="Author"$>"><$mt:EntryAuthorDisplayName$></a>
MG on February 9, 2012, 1:34 p.m. Reply
This did not work properly for me; within the entry template,
<mt:entryLink type=”Category” />
always outputs a link to another archive list! Not even to a category list.