Glue Plugin for Movable Type
Current version: 1.1 (7/12/04)
- Download (.tar.gz file)
- Plugin Code (.pl file)
- About the Glue Plugin
- MTGlueContainer
- MTGlue
- MTGlueOmitPrevious
- Version History
About the Glue Plugin
This Movable Type plugin implements a set of template tags for defining a section of text and/or HTML code as "glue" that will appear between items (entries, categories, comments, etc.) in a listing, and will not appear after the last item in the listing. The functionality is similar to that of the glue
attribute of Movable Type's MTEntryCategories
tag, although the way the plugin is used within a template is somewhat different.
Installation
To install the Glue plugin, upload the file Glue.pl to the plugins directory within your Movable Type directory. If you do not already have a plugins directory, create one before uploading the file. For more information about Movable Type plugins, see the documentation.
Support
Please use the support forums for all support requests, bug reports, feature requests, questions, and comments regarding this plugin.
MTGlueContainer
This container tag should go around the tag that will loop through the items in your listingfor instance, MTEntries
, MTCategories
, or MTComments
. Within the listing, use MTGlue
to specify the position and text of the glue itself.
The following example will insert a horizontal rule between your entries:
<MTGlueContainer> <MTEntries> <p><$MTEntryTitle$><br> <$MTEntryBody$> <MTGlue> <hr size="1"> </MTGlue> </MTEntries> </MTGlueContainer>
MTGlue
This container tag encloses the text and/or HTML code that will be used as glue. It should be used within a listing tag such as MTEntries
, which in turn should be enclosed within MTGlueContainer
.
MTGlueOmitPrevious
This tag is intended to be used within MTDateHeader
. Depending on what your date header contains, it might look bad if your glue code appears after an entry that precedes a new date's entriesfor example, your glue consists of an image but your date header begins with its own image, and you don't want the two images stacked on top of each other. In such a situation, use MTGlueOmitPrevious
within MTDateHeader
. This tells MTGlueContainer
to omit each
"piece of glue" that precedes a date header, as in the following example:
<MTGlueContainer> <MTEntries> <MTDateHeader> <$MTGlueOmitPrevious$> <br><img src="dateheader.gif"><br> <b>Entries for <$MTEntryDate format="%B %e, %Y"$></b> </MTDateHeader> <p><$MTEntryTitle$><br> <$MTEntryBody$> <MTGlue> <hr> </MTGlue> </MTEntries> </MTGlueContainer>
Version History
7/12/04 - version 1.1
- Plugin now registers itself with MT 3 interface.
- Added $VERSION variable.
- All container tags now pass conditions along when building contents, so they'll work outside conditional tags within MTEntries, etc.
9/3/02 - version 1.0 released