Title Case for Movable Type
22nd May 2008
John Gruber shared a code snippet that converts strings to Title Case. It’s actually more clever than it sounds, taking into account the need to keep a collection of small words uncapitalised, and correctly handling punctuation issues.
Here’s a version for Movable Type that can be used to automatically convert entry titles to title case. It is essentially a wrapper for John’s script that adds some functionality to deal with html entities (so it should play nice with Smarty Pants and Widon’t).
Download
Title Case for Movable Type v1.1 (2008-05-23)
Installation
Unzip the file and place TitleCase.pl in the plugins directory of your Movable Type installation.
(mthome)/plugins/TitleCase.plUsage
For titles, add the global filter titlecase="1" to your entry title tags:
<mt:EntryTitle titlecase="1"/>This project is also hosted on github.
