MT Blogroll Template Tags
Here is a list of template tags provided by MT Blogroll
MTBlogrollEntries
<MTBlogrollEntries>
...
</MTBlogrollEntries>
A container tag representing all the links in your Blogroll. The default is to display all links sorted ascending by priority. To alter this behavior, you can provide one of the following attributes:
blog_id="X"— Display the blogroll assigned to blogX, whereXis theblog_idof the appropriate blog.lastn="N"— Display the lastNlinks (according tosort_orderandsort_bybelow), whereNis some number greater than0.offset="M"— StartsMlinks from the first (according tosort_orderandsort_bybelow), then displays the remaining links (or the nextNlinks if used in combination with lastn). For example, the following tag:<MTBlogrollEntries lastn="5" offset="5"> ... </MTBlogrollEntries>category="C"— Display all posts from the category with nameC. Note that this can result in a long list of links, and you may want to uselastnto only display a certain number of links.If you wish to pull links from several categories, or to restrict links to those that are assigned to several categories, category name can include boolean
ANDandORlogic. Note that it can only include one or the other, however, so you cannot sayFoo AND Bar OR Baz--that will not work. You can only sayFoo AND Bar AND ...orFoo OR Bar OR ....For example, if you wished to list all links assigned to both Foo and Bar you could use:
<MTBlogrollEntries category="Foo AND Bar"> ... </MTBlogrollEntries>author="A"— Display all links created by by the author with usernameA. Note that this result in a long list of links, and you may want to uselastnto only display a certain number of links.sort_order="ascend|descend"— Specifies the sort order for this particular<MTBlogrollEntries>tag. Valid values areascendanddescend. The default value isascend.sort_by="field name"— Specifies the field by which to sort. Valid values arename,uri,priorityandupdated
Attributes of MTBlogrollEntries can be combined in arbitrary ways, for example:
<MTBlogrollEntries lastn="10" offset="10" category="foo" sort_order="ascend" sort_by="name">
...
</MTBlogrollEntries>
MTBlogrollEntryRel
<MTBlogrollEntryRel>
MT Blogroll allows you to define an XFN Relationship for each link. This tag can be used to display this relationship. Typically it will be used within an anchor tag like so
<a href="<MTBlogrollEntryURI>" rel="<MTBlogrollEntryRel>">...</a>
MTBlogrollEntryIfRel
<MTBlogrollEntryIfRel>
Not all your links may have an XFN Relationship hence you may find that some of your rel attributes are empty and as a result your pages no longer validate. This tag comes to the rescue, a conditional container tag that will display its contents only if the link has an XFN Relationship. Typical usage:
<a <MTBlogrollEntryIfRel>rel="<MTBlogrollEntryRel>"</MTBlogrollEntryIfRel>>...</a>
MTBlogrollEntryDate
<MTBlogrollEntryDate>
The date the link was created. This tag can take the optional format and language attributes as described here
MTBlogrollEntryModifiedDate
<MTBlogrollEntryModifiedDate>
The date the link was last modified within MT Blogroll, not to be confused with MTBlogrollEntryUpdated which displays the time the link was last updated.
This tag can take the optional format and language attributes as described here
MTBlogrollEntryCategories
<MTBlogrollEntryCategories>
...
</MTBlogrollEntryCategories>
A container tag representing a list of all of the categories - including the primary category - to which the link belongs. Inside of this container you can use any of the MTBlogrollCategory tags to display information about each category.
You can supply this tag with the glue attribute to separate each of the categories, for example, to separate categories with a comma:
<MTBlogrollEntryCategories glue=", ">
...
</MTBlogrollEntryCategories>
Note: that the value of the glue attribute cannot contain a single or double quote.
MTBlogrollEntryUpdated
<MTBlogrollEntryUpdated>
The time a link was last updated from Technorati. Note: MT Blogroll must be setup to gather last update times for this tag to work.
MTBlogrollCategories
<MTBlogrollCategories>
...
</MTBlogrollCategories>
A container tag that represent all link categories in your blogroll. You can use any of the MTBlogrollCategory tags within this container to display information about your Link Categories.
You can also use MTBlogrollEntry tags to display links within each Link Category:
<MTBlogrollCategories>
<MTBlogrollEntries>
..
</MTBlogrollEntries>
</MTBlogrollCategories>
MTBlogrollLinks
<MTBlogrollLinks lastn="10" offset="10" category="foo" sort_order="ascend" sort_by="name"> ... </MTBlogrollLinks>
A container tag representing all the links in your Blogroll. The default is to display all links sorted ascending by priority. To alter this behavior, you can provide one of the following attributes:
blog_id="X"— Display the blogroll assigned to blogX, whereXis theblog_idof the appropriate blog.lastn="N"— Display the lastNlinks (according tosort_orderandsort_bybelow), whereNis some number greater than0.offset="M"— StartsMentries from the first (according tosort_orderandsort_bybelow), then displays the remaining entries (or the nextNentries if used in combination withlastn). For example, the following tag:<MTBlogrollLinks lastn="5" offset="5"> ... </MTBlogrollLinks>
category="category name"— Display all posts from the categorycategory name. Note that this can be a long list of entries, and you may want to uselastnto only display a certain number of entries.If you wish to pull entries from several categories, or to restrict entries to those that are assigned to several categories,
category namecan include booleanANDandORlogic. Note that it can only include one or the other, however, so you cannot sayFoo AND Bar OR Baz-- that will not work. You can only sayFoo AND Bar AND ...orFoo OR Bar OR ....For example, if you wished to list all entries assigned to both Foo and Bar you could use:
<MTBlogrollLinks category="Foo AND Bar"> ... </MTBlogrollLinks>
author="author name"— Display all posts by the authorauthor name. Note that this can be a long list of entries, and you may want to uselastnto only display a certain number of entries.sort_order="ascend|descend"— Specifies the sort order for this particular<MTBlogrollLinks>tag. Valid values areascendanddescend. The default value isascend.sort_by="field name"— Specifies the field by which to sort. Valid values are:name- sort by link nameuri- sort by link uriblog_author- sort by the link's author (the value of theWeblog Authorfield)priority- sort by link priorityupdated- sort by link's last update timecreated_on- sort by link's creation daterandom- randomly sort links
Attributes of MTBlogrollLinks can be combined in arbitrary ways.
MTBlogrollLinkIfRel
<MTBlogrollLinkIfRel>
Not all your links may have an XFN Relationship hence you may find that some of your rel attributes are empty and as a result your pages no longer validate. This tag comes to the rescue, a conditional container tag that will display its contents only if the link has an XFN Relationship. Typical usage:
<a <MTBlogrollLinkIfRel>rel="<MTBlogrollLinkRel>"</MTBlogrollLinkIfRel>>...</a>
MTBlogrollLinkCategories
<MTBlogrollLinkCategories>
...
</MTBlogrollLinkCategories>
A container tag representing a list of all of the categories - including the primary category - to which the link belongs. Inside of this container you can use any of the MTBlogrollCategory tags to display information about each category.
You can supply this tag with the glue attribute to separate each of the categories, for example, to separate categories with a comma:
<MTBlogrollLinkCategories glue=", ">
...
</MTBlogrollLinkCategories>
Note: that the value of the glue attribute cannot contain a single or double quote.
MTBlogrollLinkIfUpdated
<MTBlogrollLinkIfUpdated>...</MTBlogrollLinkIfUpdated>
A conditional container tag: the contents of this container will be displayed if this link has an update time that is within the duration constraint specified in the configuration.
This can be useful for manipulating recently updated links, for example the following code block will display *NEW* next to links that have been recently updated
<MTBlogrollLinkIfUpdated>*NEW*</MTBlogrollLinkIfUpdated>
MTBlogrollTagRank
A variable tag which returns a number from 1 to 6 (by default) which represents the rating of the tag in context in terms of usage where '1' is used for the most often used tags, '6' for the least often. The tag context is created by either an MTBlogrollLinkTags or an MTBlogrollTags block.
This is suitable for creating "tag clouds" in which MTBlogrollTagRank can determine what level of header (h1 - h6) to apply to the tag.
This tag takes the following optional attributes:
* `max` - Allows a user to specify the upper bound of the scale.
The following is a very basic tag cloud suitable for an index template or, with some styling, a sidebar of any page.
<h1>Tag cloud</h1>
<div id="tagcloud">
<MTBlogrollTags>
<h<$MTBlogrollTagRank$>>
<$MTBlogrollTagName$>
</h<$MTBlogrollTagRank$>>
</MTBlogrollTags>
</div>
MTBlogrollTagName
A variable tag that outputs the name of the entry tag currently in context. The tag context is created by either an MTBlogrollLinkTags or an MTBlogrollTags block.
This tag takes the following optional attributes:
* `quote` - Adds double quotes around the any tag name which contains spaces
* `normalize` - Returns the normalized version of the tag name stored in the system. The tag "Movable Type" would yield a normalized version of "movabletype".
MTBlogrollTags
A container tags used for listing all previously assigned tags for the blogroll in context. It takes the following optional attributes:
* `glue` - A text string that is used to join each of the items together. For example `<MTBlogrollTags glue=", "><$MTBlogrollTagName$></MTBlogrollTags>` would print out each tag name separated by a comma and a space.
The following code is functional on any template. It prints a simple list of tags for a blogroll.
<ul>
<MTBlogrollTags>
<li>
<$MTBlogrollTagName$></a>
</li>
</MTBlogrollTags>
</ul>
MTBlogrollLinkIfTagged
A conditional block which outputs its content if the entry in context has any tags defined. Optional Attributes:
* `tag` - Allows a user to specify a particular tag to test.
MTBlogrollLinkTags
A container tag used to output infomation about the tags assigned to the link in context. Optional attributes
glue- A text string that is used to join each of the items together. For example<MTEntryTags glue=", "><$MTTagName$></MTEntryTags>would print out each tag name separated by a comma and a space.



