Content Management
SmartBody Plugin
Freshness Warning
This blog post is over 22 years old. It's possible that the information you read below isn't current and the links no longer work.
2 Jul 2002
MTSmartBody is a Movable Type plugin that inserts a post’s excerpt if it has one and the post’s body if it doesn’t.
A bonus tag included with MTSmartBody is the container tag MTEntryIfExcerpt. The contents of this tag will be displayed if an entry has an excerpt.
Why would you want such a thing? It’s a useful replacement to auto-generated excerpts. In your RSS file or your main index template, it would be nice to display the excerpt if you wrote one, but you’d rather not see a truncated copy of your post used if you don’t have an excerpt.
Tim Appnel has taken over the maintenance and support of this plugin as of Oct 2004.
Download
You can get SmartBody by downloading SmartBody.zip.
Installation. Once you’ve downloaded and unzipped SmartBody.zip, connect to your FTP server and open the directory where you have Movable Type installed.
Create a directory there called plugins if there isn’t one already.
Copy SmartBody.pl to the plugins directory and set the permissions to 755.
Using MTSmartBody
Once you’ve installed MTSmartBody, using it is as simple as placing a new Movable Type tag in your template.
The <MTEntrySmartBody> and <MTEntryIfExcerpt></MTEntryIfExcerpt> tags go between the <MTEntries></MTEntries> tags. MTSmartBody will check to see if an entry has an excerpt and insert it if it does, or insert the body if it doesn’t.
MTEntryIfExcerpt will also check to see if an entry has an excerpt and insert the contents of the tag if it does.
Example:
<MTEntries> <MTEntrySmartBody> <MTEntryIfExcerpt> <br><a href="<$MTEntryLink$>">Read more...</a> </MTEntryIfExcerpt> </MTEntries>
License. Like our other freeware, this plugin is released under the open-source MIT License. In plain English, that means you can do whatever you want with the software, including modifying it, selling it, or eating it, but we’re not responsible for anything that goes wrong.
Revision History
1.0 - July 2, 2002
Initial release.