<$mt:TagRank$>

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 EntryTags or an Tags block.

This is suitable for creating "tag clouds" in which TagRank can determine what level of header (h1 - h6) to apply to the tag.

Attributes:

  • max (optional; default "6")

    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">
        <mt:Tags>
            <h<$mt:TagRank$>>
                <a href="<$mt:TagSearchLink$>"><$mt:TagName$></a>
            </h<$mt:TagRank$>>
        </mt:Tags>
    </div>
This page was last updated on 1969-12-31, 16:00.

3 Notes

This tag supports the MultiBlog template tag attributes blog_ids/include_blogs and exclude_blogs for aggregating across different blogs.

my tag does NOT return random number ;)

If you're not getting a different number it means that the tags you get displayed are all having the exact same number of entries associated to them.

The number depends on the number of entries assigned to a tag. If this number is different from a tag to another, then each tag would get a ranking number.

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.