Movable Type Enterprise Documentation

« MTSearchIncludeBlogs | Up | MTSearchTemplateId »

Chapter Entry Tags

MTTagSearchLink

A variable tag that outputs a link to a tag search for the entry tag in context. The tag context is created by either an MTEntryTags or an MTTags block.

Like all variable tags, you can apply any of the supported global filters to MTTagSearchLink to do further transformations.

Example code

The example below shows each tag in a cloud tag linked to a search for other entries with that tag assigned. It can just as easily be used to link entry tags within an MTEntryTags loop

<h1>Tag cloud</h1>
<div id="tagcloud">
    <MTTags>
        <h<$MTTagRank$>>
            <a href="<$MTTagSearchLink$>"><$MTTagName$></a>
        </h<$MTTagRank$>>
    </MTTags>
</div>

The search link will look something like:

http://example.com/mt/mt-search.cgi?blog_id=1&tag=politics

Using Apache rewriting, the search URL can be cleaned up to look something like:

http://example.com/tag/politics

See Chapter 8 in the Users and Administrators Guide entitled "Customizing Your Published Weblogs" for more examples related to entry tags, including the creation of "tag clouds".

You can download the Users and Administrators Guide here.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or question. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Enterprise Support.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.