• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: V Appendixes > Entry Tags

Entry Tags

The template tags shown in Table B.2 give you access to the data about the entries posted to your weblog.

Table B.2. Entry Tags
Tag NameTag TypeDescription
MTCCLicenseRDFVSee the MTCCLicenseRDF entry under “Weblog Tags.” When this tag is used in an entry context, additional information specific to the entry is inserted.
MTDateFooterCCThe contents of this tag are evaluated if the current entry is the last one for the date being processed.
MTDateHeaderCCThe contents of this tag are evaluated if the current entry is the first one for the date being processed.
MTEntriesLCIterates over the list of entries to be displayed.

Unique attributes:

author: Include only entries by the specified author. This value is the author's user name in Movable Type, not his or her nickname, which you may be using for display.

category: Include only entries in the specified category. Multiple categories can be combined with either AND or OR operators, but not both (for example, apples AND oranges or apples OR oranges, but not apples AND oranges OR bananas).

days: Include only entries that have been posted within the number of days specified.

lastn: Include only the specified number of most recent entries.

offset: Start the entry list the specified number of entries back from the most recent. This attribute only makes sense when used in tandem with lastn.

For example, if you wanted to display ten entries on a page but treat the first three differently from the last seven, you might use two MTEntries tags with attributes like these:
<MTEntries lastn="3">
...
</MTEntries>

<MTEntries lastn="7" offset="3">
...
</MTEntries>

recently_commented_on: List the specified number of entries that have most recently received comments. An entry is only listed once, and is sorted into position by the date and time its most recent comment was received.

sort_by: Sort entries based on something other than the default of the date they were authored. Acceptable values are

author_id
excerpt
modified_on
status
title

sort_order: Sort entries in the order specified—either ascend or descend.

MTEntriesFooterCCThe contents of this tag are evaluated if the current entry is the last one in the list of entries being processed.
MTEntriesHeaderCCThe contents of this tag are evaluated if the current entry is the first one in the list of entries being processed.
MTEntryAuthorVInserts the name of the author of the current entry, as entered in the author's user profile.
MTEntryAuthorEmailVInserts the email address of the author of the current entry, as entered in the author's user profile. Attributes:

spam_protect: If set to 1, certain characters in the email address of the author will be masked in a way that should allow them to function and display properly in a browser, but should make it slightly less likely that the address will be harvested by spam spiders crawling the Web looking for email addresses to add to their lists.

MTEntryAuthorLinkVInserts the name of the author of the current entry marked up as a link, either to the author's Web site or email address. Attributes:

show_email: Setting this attribute to 0 will cause the author's email address not to be used.

show_url: Setting this attribute to 0 will cause the author's Web site URL not to be used.

spam_protect: Same behavior as in the MTEntryAuthorEmail tag when the author's email address is used to build the link.

MTEntryAuthorNicknameVInserts the nickname of the author of the current entry, as entered in the author's user profile.
MTEntryAuthorURLVInserts the URL of the Web site of the author of the current entry, as entered in the author's user profile.
MTEntryBodyVInserts the Entry Body text for the current entry. Attributes:

convert_breaks: A Boolean attribute that accepts either 0 or 1 as its value; it controls whether line and paragraph breaks in the body text will be converted to HTML tags (1 = yes, 0 = no). This value overrides the Text Formatting setting specified for the entry.

words: Display only the specified number of words from the beginning of the entry body.

MTEntryCategoriesLCIterates over the list of categories the current entry belongs to. Attributes:

glue: The value of this attribute is used to separate the various categories listed. For example, to create a comma-separated list of the categories an entry belongs to, you might do something like this:

<MTEntryCategories glue=", ">
  <$MTCategoryLabel$>
</MTEntryCategories>

MTEntryCategoryVInserts the name of the current entry's primary category.
MTEntryCommentCountVInserts the number of comments that have been left for the current entry.
MTEntryDateVInserts the date of the current entry. Attributes:

format: Controls how the date is written. (See “Formatting Dates” later in this appendix.)

language: Specifies in what language the date is to be written.

MTEntryExcerptVInserts the “Excerpt” text for the current entry if one is available, or the first 20 words of the “Entry Body” if one is not. Attributes:

convert_breaks: A Boolean attribute that accepts either 0 or 1 as its value; it controls whether line and paragraph breaks in the excerpt text will be converted to HTML tags (1 = yes, 0 = no).

MTEntryFlagVInserts the value, either 0 or 1, of a Boolean flag variable. Attributes:

flag: Specifies the flag to be inserted. Acceptable attribute values are convert_breaks and allow_comments.

MTEntryIDVInserts the numeric ID of the current entry. Attributes:

pad: Set to 1, the entry's ID will be zero-padded to six characters (for example, 123 would become 000123).

MTEntryIfAllowCommentsCCThe contents of this tag are evaluated if comments have been enabled for the current entry.
MTEntryIfAllowPingsCCThe contents of this tag are evaluated if TrackBack pings have been enabled in either “Open” or “Closed” form for the current entry.
MTEntryIfCommentsOpenCCThe contents of this tag are evaluated if comments have been enabled in “Open” form for the current entry.
MTEntryIfExtendedCCThe contents of this tag are evaluated if “Extended Entry” text has been entered for the current entry.
MTEntryKeywordsVInserts the value of the Keywords field for the current entry.
MTEntryLinkVInserts the URL of the archive page of the type specified as the Preferred Archive Type containing the current entry. Attributes:

archive_type: Specifies which archive type page should be used. Acceptable values are

Individual
Category
Daily
Weekly
Monthly

MTEntryMoreVInserts the “Extended Entry” text for the current entry. Attributes:

convert_breaks: A Boolean attribute that accepts either 0 or 1 as its value; it controls whether line and paragraph breaks in the excerpt text will be converted to HTML tags (1 = yes, 0 = no).

MTEntryNextXCThe contents of this tag are evaluated in the context of the entry after the current one.
MTEntryPermalinkVInserts the URL of the archive page of the type specified as the “Preferred Archive Type” containing the current entry, including a named anchor to the actual entry if necessary (that is, if the archive type is anything other than “Individual”).
MTEntryPreviousXCThe contents of this tag are evaluated in the context of the entrybefore the current one.
MTEntryStatusVInserts the “Post Status” value of the current entry, either “Draft” or “Publish.” This is really only useful in the Export utility because entries will only be published to your site when their status is “Publish.”
MTEntryTitleVInserts the value of the “Title” field for the current entry.
MTEntryTrackbackCountVInserts the number of TrackBack pings received for the current entry.
MTEntryTrackbackDataVInserts the RDF representing the TrackBack data for the current entry.
MTEntryTrackbackIDVInserts the numeric ID used to connect a TrackBack ping to the current entry.
MTEntryTrackbackLinkVInserts the URL that will receive a TrackBack ping for the current entry if enabled.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint