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.
A container tag whose contents will be displayed if the entry in context was posted on a different day than the following/next entry in the list.
A container tag which iterates over a list of published entries from a weblog. The default behavior is set according to the "Entries to Display" and "Entry Order" controls in the General Settings. These settings can be overridden with the use of these optional attributes.
Entry Filtering Attributes:
author - Filters the entries by the given author's username.category - Filters the entries by the given category label. Multiple categories can be defined in the value of the attribute and can include boolean "AND" and "OR" logic. Boolean logic may not be mixed. For instance "Foo AND Bar OR Baz" is not permitted.tag - Filters the entries by the given assigned tag or a boolean logic construct. See below for details.days - Filters all posts less than N days old. N is a positive integer. days should be used separately from other attributes. If used with another attribute, days is ignored.lastn - Display the last N posts of the weblog. N is a positive integer.offset - Used in coordination with lastn, starts M entries from the start of the list. N is a positive integer.recently_commented_on - Display the N most recently commented-on entries. Each entry will appear in the list only once. N is a positive integer.blog_ids - This attribute allows you to aggregate entries from other blogs into your MTEntries listing. Blogs are specified by their blog IDs in a comma-delimited fashion. (e.g. <MTEntries blog_ids="1,12,19,37,112">). A value of all expands the context to all blogs in the installation. This feature is available only in Movable Type Enterprise.Entry Sorting Attributes:
sort_by - Specifies the field to sort the list by. Recognized values are "title," "modified_on," "author_id," and "excerpt." The default is the authored on date.sort_order - Specifies the sort order and overrides the General Settings. Recognized values are "ascend" and "descend."When used as an attribute of MTEntries in the templates, the days, lastn, and sort_order attributes override their corresponding settings in the weblog's General settings menu.
Boolean logic for category and tag attributes Can do advanced boolean logic in category and tag attributes (AND, OR, NOT, parenthetical grouping). For example:
<MTEntries category="((Cats AND Dogs) OR General) NOT Private">
Combination of attributes
The contents of this container tag will be displayed when the last entry listed by a MTEntries tagset is reached.
The contents of this container tag will be displayed when the first entry listed by a MTEntries tagset is reached.
A generated immutable identifier for use in Atom syndication feeds.
The display name of the author. If no display name is specified, returns NULL, and no name is displayed.
The email address of the author. The spam_protect global filter may be used.
A linked version of the author's user name, using the author URL if provided in the author's profile. Otherwise, the author name is unlinked. This behavior can be altered with optional attributes:
Attributes:
show_email - Specifies if the author's email can be displayed. The default is false (0).show_url - Specifies if the author's URL can be displayed. The default is true (1).new_window - Specifies to open the link in a new window by adding "target=_blank" to the anchor tag. See example below. The default is false (0). new_window Example code:
<$MTEntryAuthorLink new_window="1"$>
would become
<a href="http://www.sixapart.com/" target="_blank">Six Apart</a>
If no display name is specified, MTEntryAuthorDisplayName returns NULL, and no name is displayed.
Can this be spam protected?
Deprecated. See MTEntryAuthorDisplayName.
The URL of the author.
The username of the author.
By default, the entry basename is a constant and unique identifier for an entry which is used as part of the individual entry's archive filename.
The basename is created by dirifiying[1] the entry title when the entry is first saved (regardless of the entry status). The system ensures that each basename is unique, even if the entry titles aren't, by adding an underscore and a number (_1, _2, ..., _10, etc) and incrementing that number until uniqueness is achieved.
From then on, barring direct manipulation, the entry basename stays constant even when you change the entry's title. In this way, Movable Type ensures that changes you make to an entry after saving it don't change the URL to the entry, subsequently breaking incoming links.
The entry basename can be modified by anyone who can edit the entry. If it is modified after it is created, it is up to the user to ensure uniqueness and no incrementing will occur. This allows you to have complete and total control over your URLs when you want to as well as effortless simplicity when you don't care.
separator - Valid values are "_" and "-". Specifying an underscore will convert any dashes to underscores. Specifying a dash will convert any underscores to dashes.[1] - Dirification is a process of text normalization done for the purpose of creating a consistent and predictable string. In Movable Type, this means removal of all non-ASCII characters, replacement of spaces with underscores, lowercasing of all letters, etc. See the description of the dirify global attribute for more.
This tag outputs the contents of the entry's Entry Body field. If a text formatting filter has been specified it will automatically applied.
Context: Within MTEntries block
Attributes:
convert_breaks - Controls the application of text formatting. By default convert_breaks is 1 (true).words - Trims the number of words to display. By default all are displayed. A container tag that lists all of the categories (primary and secondary) to which the entry is assigned. This tagset creates a category context within which any category or subcategory tags may be used.
Attributes:
glue - This attribute is a shortcut for connecting each category label with the attribute value. Single and double quotes are not permitted in the string.The number of published comments for the entry in context.
The authored on timestamp for the entry. Date format tags may be applied with the format attribute along with the language attribute. See Chapter C: Date Formats.
This tag outputs the contents of the Entry Excerpt field if one is specified or, if not, an auto-generated excerpt from the Entry Body field followed by an ellipsis ("..."). You can change the length of the auto-generated output of this tag in the weblog's general settings screen.
Context: Used within an MTEntries block
Attributes:
no_generate - When set to 1, the system will not auto-generate an excerpt if the excerpt field of the entry is left blank. Instead it will output nothing.convert_breaks - When set to 1, the entry's specified text formatting filter will be applied. By default, the text formatting is not applied and the excerpt is published either as input or auto-generated by the systemRelated topics:
This tag can be used to determine the value of one of the entry's binary options.
Output:
Attributes:
flag - A required attribute that specifies a field to evaluate. Recognized values are convert_breaks and allow_comments.Example:
<MTIfNonEmpty tag="EntryFlag" flag="allow_comments">
Comments are turned on for this entry
</MTIfNonEmpty>
Related topics:
The numeric system ID of this entry.
Attributes:
pad - Adds leading zeros to create a 6 character string. The default is 0 (false). This is equivalent to using the zero_pad global filter with a value of 6.Deprecated. See MTIfCommentsAccepted.
Deprecated. See MTIfPingsAccepted.
Deprecated. See MTIfCommentsActive.
A conditional tag that displays its contents if the Extended Entry field has been defined.
A conditional block which outputs its content if the entry in context has any entry tags defined. Optional Attributes:
tag - Allows a user to specify a particular tag to test.Example code
The following iterates over MTEntries and, for any entries which have non-private tags assigned, prints out the entry title and all of the non-private tags that are assigned to the entry (glued together by a comma and a space)
<MTEntries>
<MTEntryIfTagged>
The entry "<$MTEntryTitle$>" is tagged:
<MTEntryTags glue=", "><$MTTagName$></MTEntryTags>
</MTEntryIfTagged>
</MTEntries>
The following prints out the entry title for each entry in the MTEntries loop as well as an "Important" icon when the entry is tagged "Important":
<MTEntries>
<MTEntryIfTagged tag="Important">
<img src="important.gif" alt="Important"/>
</MTEntryIfTagged>
<$MTEntryTitle>
</MTEntries>
Like with all conditional blocks, you can use MTElse to handle the inverse situation. In the example below case, something is printed for each entry returned by MTEntries. If there are tags assigned to the entry, the output is the same as in the first example. If not, the entry title is printed along with a message indicating there are no tags.
<MTEntries>
The entry "<$MTEntryTitle$>"
<MTEntryIfTagged>
is tagged: <MTEntryTags glue=", "><$MTTagName$></MTEntryTags>
<MTElse>
has no entry tags.
</MTElse>
</MTEntryIfTagged>
</MTEntries>
Naturally, you can also nest MTEntryIfTagged blocks to test for multiple individual tags or to test for a particular tag first and then for the presence of any tag.
Below is a complex example demonstrating multiple nested blocks and use of MTElse. It displays one of four images next to each entry title based on whether something is tagged "important" and then additionally tagged additionally "feature" or "bug":
<MTEntries>
<MTEntryIfTagged tag="Important">
<MTEntryIfTagged tag="Feature">
<img src="important_feature.gif" alt="Important feature"/>
<MTElse>
<MTEntryIfTagged tag="Bug">
<img src="important_bug.gif" alt="Important bug"/>
<MTElse>
<img src="important.gif" alt="Important"/>
</MTElse>
</MTEntryIfTagged>
</MTElse>
</MTEntryIfTagged>
<MTElse>
<img src="not_important.gif" alt="Not important"/>
</MTElse>
</MTEntryIfTagged>
<$MTEntryTitle>
</MTEntries>
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".
The specified keywords of the entry.
An absolute URL pointing to an archive page containing this entry. By default the tag will generate a URL to the preferred archive type specified in the weblog's Publishing Settings.
Attributes:
archive_type - Overrides the default behavior with a different archive type. Recognized values are "Category," "Monthly," "Weekly," "Daily," and "Individual."For an entry's permalink see MTEntryPermalink.
The last modified date and time for the entry. Date format tags may be applied with the format attribute along with the language attribute. See Chapter C: Date Formats: Date formats.
The contents of the extended/more entry content. If any text formatting has been specified it will automatically applied.
Attributes:
convert_breaks - Controls the application of text formatting. By default convert_breaks is 1 (true).A container tag that creates a context to the next entry after the one in context.
An absolute URL pointing to the archive page containing this entry. An anchor (#) is included if the permalink is not pointing to an Individual Archive page.
A container tag that creates a context to the previous entry before the one in context.
Displays the status of an entry. The returned value should be either "Unpublished," "Published," or "Scheduled." This tag is used primarily in creating entry exports.
A container tag used to output infomation about the entry tags assigned to the entry 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.
Example code
The following code can be used anywhere MTEntries can be used. It prints a list of all of the tags assigned to each entry returned by MTEntries glued together by a comma and a space.
<MTEntries>
The entry "<$MTEntryTitle$>" is tagged:
<MTEntryTags glue=", "><$MTTagName$></MTEntryTags>
</MTEntries>
To avoid printing out the leading text when no entry tags are assigned you can use the MTEntryIfTagged conditional block to first test for entry tags on the entry. You can also use the MTEntryIfTagged conditional block with the tag attribute to test for the assignment of a particular entry tag.
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".
The title of the entry in context.
The number of published TrackBack pings for the entry.
Outputs the machine-readable TrackBack RDF for "pinging" corresponding to the entry.
If TrackBack pings are allowed, the numeric ID of the TrackBack item corresponding to this entry.
If TrackBack pings are allowed, the TrackBack ping URL.