Alternate Template Collection
Published on May 30, 2005 at 9:00 PM EST
In the Tutorials category.
Movable Type has a nifty feature called “alternate templates” which allows you to substitute the default MT interface with a customized one. These aren’t “individual archive” or “category archive” template replacements, these are replacements for the actual entry-editing interface.
I’ve only made a handful of alternate templates, but more will be added here as I create and modify them. (You might want to look at set up first.) Currently available are:
- Updated 2005/12/19:
edit_entry.tmplis for creating and editing entries.
- Added 2005/05/30:
preview_entry.tmplis for previewing entries. (Deprecated. Superceded by the plugin Better Entry Preview.)
- Added 2005/05/30:
upload_complete.tmplare for uploading files. (Deprecated. Superceded by the plugin Better File Uploader.
- Added 2005/05/31:
list_blog.tmplis the “Main Menu” screen. (Deprecated. Not need with MT 3.2.)
Set Up Alternate Templates
mt.cfg, add the line
Then, you’ll need to create an
alttmpl folder in your MT folder. And within that create a
cms folder, creating a structure like this:
Now, just upload any of these alternate templates into
alttmpl/cms/. Any templates found in this directory will be used instead of the default ones.
The Alternate Templates
edit_entry.tmpl (for creating and editing entries)
This template has been updated to work with MT version 3.2.
The basic MT editing tools (bold, italics, hyperlink, etc) are replaced with quite a few QuickTags: bold, italics, hyperlink, unordered list, ordered list, list item, paragraph, blockquote, code, heading level 2, heading level 3, “Close Tags” and a dictionary link. Additionally, the “Right Thumb,” “Gallery” and “Gallery Thumb” code used on danandsherree.com are here as buttons, too (more detail in Dynamic Site Design: Displaying Thumbnails with a Random Background). Mouseover any button to get a little description of its use.
It’s also worth pointing out that using the QuickTags code solves the problem of jumping back to the top of the textarea when using Firefox.
The Tag Suggest implementation includes the updated references to
edit_entry.tmpl, but you’ll still need to follow the rest of the instructions to complete this feature.
A “Now” button has been added to the template, too. Click the Now button to update the Authored On field with the current date and time.
Henrik Gustafsson updated the unordered and ordered list functionality. Now, you can select a number of lines then click the OL or UL buttons and see the whole selection turned into a list. Each newline results in a new list item. Very slick!
This template has been tested with version 3.2 of Movable Type only. An older template has been tested and used with MT 3.16 and 3.17.
preview_entry.tmpl (for previewing entries)
This template has been superceded by the plugin Better Entry Preview.
This template has been tested with MT versions 3.16, 3.17 and 3.2. Updated for version 3.2 to include keyboard shortcuts.
I often use the Preview feature to proofread an entry, but the text is too small to be easily read. Larger (and serif) text fixes the problem. Download
It’s worth noting that while this template works correctly in IE and Firefox (I haven’t tried it in other browsers), the code is actually invalid.
upload_complete.tmpl (for uploading files)
These templates have been superceded by the Better File Uploader plugin.
These templates have been tested with MT versions 3.16, 3.17 and 3.2.
I wrote extensively about these two templates in A Better Upload File Template.
upload/year/month/) and the thumbnail dimensions are calculated when the thumbnail button is checked. Lastly, the For Photo Gallery button makes MT-created galleries much faster and easier to build (though some extra code is required).
list_blog.tmpl (the “Main Menu” screen)
This template has been tested with MT versions 3.16 and 3.17. It’s no longer necessary with MT 3.2.
This template only has one very small change: a “TrackBacks” link is added to each weblog on your system. The new link is circled in the screenshot at the right. Download