<mt:EntryTags>

A container tag used to output infomation about the entry tags assigned to the entry in context.

To avoid printing out the leading text when no entry tags are assigned you can use the EntryIfTagged conditional block to first test for entry tags on the entry. You can also use the EntryIfTagged conditional block with the tag attribute to test for the assignment of a particular entry tag.

Attributes:

  • glue

    A text string that is used to join each of the items together. For example:

        <mt:EntryTags glue=", "><$mt:TagName$></mt:EntryTags>

    would print out each tag name separated by a comma and a space.

Example:

The following code can be used anywhere Entries can be used. It prints a list of all of the tags assigned to each entry returned by Entries glued together by a comma and a space.

    <mt:If tag="EntryTags">
        The entry "<$mt:EntryTitle$>" is tagged:
        <mt:EntryTags glue=", "><$mt:TagName$></mt:EntryTags>
    </mt:If>
This page was last updated on 2008-03-05, 16:31. [Edit]

1 Note

"Sticky" tags

You can use a tag called, say, @sticky to identify a page or an entry and push it to the top of the list (like a "sticky").

Note that all tags prefixed with @ and (I suspect) other non-alpha characters are ignored during a tag listing

Thus, you could do:

<mt:entries tag="@sticky">
-- do something --
</mt:entries>

to give you a listing of all pages tagged with @sticky.

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.