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:

Set Up Alternate Templates

In mt.cfg, add the line

AltTemplatePath ./alttmpl

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: alttmpl/cms/.

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)

Updated 2005/12/19.

http://www.eatdrinksleepmovabletype.com/upload/2005/10/edit_entry.tmpl-thumb.gif

This template has been updated to work with MT version 3.2.

The Edit Entry template has been revised quite a bit, incorporating my Tag Suggest feature and a variant on Alex King’s QuickTags. Download edit_entry.tmpl.

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.

authored-on-now.gif

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.

Added 2005/05/30.

http://www.eatdrinksleepmovabletype.com/upload/2005/10/preview_entry.tmpl-thumb.gif

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 preview_entry.tmpl.

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.tmpl and upload_complete.tmpl (for uploading files)

These templates have been superceded by the Better File Uploader plugin.

Added 2005/05/30.

http://www.eatdrinksleepmovabletype.com/upload/2005/10/upload2-atc-thumb.gif
http://www.eatdrinksleepmovabletype.com/upload/2005/10/upload-atc-thumb.gif

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.

Using some JavaScript a dynamic upload directory is selected (in the form of 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).

Download upload.tmpl and upload_complete.tmpl.

list_blog.tmpl (the “Main Menu” screen)

Added 2005/05/31.

http://www.eatdrinksleepmovabletype.com/upload/2005/10/list_blog.tmpl-thumb.gif

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 list_blog.tmpl.