Plugins : MTTagInvoke 1.0 Jul 30 2003 | # | C:19

MTTagInvoke 1.0

July 30, 2003 - updated September 13, 2006 (Download)

Important: MovableType 3.3 added support for “tags” that can be associated with an entry. As part of this feature, it included a built-in MTTagName template tag which was conflicting with a tag progived in version 0.9b of this plugin. Thus the name of the tags in this plugin have been changed (i.e. MTTagName to MTTagInvokeName). If you upgrade this plugin, you will have to change your templates as well.

MovableType tags use attributes to modify their behavior. For example, the MTEntries tag uses the lastn attribute to specify how many entries to display.

In some situations, you would like to be able to use MT tags to specify the value in another MT tag attribute. However, MovableType does not allow this type of tag nesting. Some plugins get around this limitation by allowing you to use an alternate syntax for specifying tags in attribute values (usually by using brackets around the tag name).

This plugin allows you to use MT tags for specifying attributes in all MT tags. The plugin uses the MTInvokeTag tag to specify which tag should be called. Inside the MTInvokeTag you can specify attributes using the MTTagAttribute tags.

Example: The following code uses the MTEntryKeywords field to specify the search attribute for the MTAmazon tags:

<br />
<MTTagInvoke tag_name="MTAmazon" associateid="nonplus" method="Asin"> <br />
<MTTagInvokeAttribute name="search"><MTEntryKeywords></MTTagInvokeAttribute><br />
</MTTagInvoke><br />

Example: The following code uses the MTEntryKeywords field to specify the number of comments to be listed:

<br />
<MTTagInvoke tag_name="MTComments"> <br />
<MTTagInvokeAttribute name="lastn"><MTEntryKeywords></MTTagInvokeAttribute><br />
<MTTagInvokeContent><br />
    <p><$MTCommentAuthor$> said:<br /><br />
    <$MTCommentBody$></p><br />
</MTTagInvokeContent><br />
</MTTagInvoke><br />

  • MTTagInvokeVersion
    Returns the version of the MTTagInvoke plugin.
  • MTTagInvoke
    Container tag that invokes another MovableType tag. The name of the tag can be specified with the tag_name attribute or inside a nested MTTagName tag. If you specify other attributes, they will be passed on to the tag that’s being invoked.
    • tag_name=”tag
      Name of the tag that is being invoked.
  • MTTagInvokeName (formerly known as MTTagName)
    Container tag (inside of MTTagInvoke) that specifies the name of the tag to be invoked.
  • MTTagInvokeAttribute (formerly known as MTTagAttribute)
    Container tag (inside of MTTagInvoke) that specifies an attribute of the tag to be invoked.
    • name=”attribute name
      Name of the attribute being specified.
  • MTTagInvokeContent (formerly known as MTTagContent)
    Container tag (inside of MTTagInvoke) that specifies the content of the tag to be invoked. This tag is only needed for calling container tags (e.g. MTEntries).
Version History
  • Version 1.0 - September 7, 2006
    MT 3.3 has a builtin-in tag (MTTagName) that was clashing with this plugin. Modified tag names in plugin to all have an MTTagInvoke prefix.
  • Version 0.9b - July 30, 2003