Welcome to MTTags.com. Hopefully, you'll discover that this a really easy place to find information about Movable Type Template Tags. If you think we could be doing something better, please let us know! If this is your first time here, be sure to stop by the information desk, because we've got a growing todo list that might already include what you were about to suggest.

<MTTagRank>

A variable tag which returns a number from 1 to 6 (by default) which represents the rating of the entry 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 MTEntryTags or an MTTags block.

This is suitable for creating "tag clouds" in which MTTagRank can determine what level of header (h1 - h6) to apply to the tag. Please see the important note about including tag clouds on archive pages if you are considering such a thing.

Optional attributes

  • max - Allows a user to specify the upper bound of the scale.

Example code

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">
    <MTTags>
        <h<$MTTagRank$>>

            <a href="<$MTTagSearchLink$>"><$MTTagName$></a>
        </h<$MTTagRank$>>
    </MTTags>
</div>

See the relevant section of Chapter 5.4 in the User and Administration Manual entitled "Using Template Modules" for more examples related to entry tags, including the creation of "tag clouds".

Also, please see the important performance note regarding where MTTags lists are best placed for optimum performance, also in Chapter 5.4 of the User and Administration Manual, under "Eliminating redundant publishing".