Not a developer? Go to


Upgrading Your MT3 Templates to Movable Type 4.0

Movable Type 4.0 has introduced tons of new features including a completely re-envisioned templating and archiving system to make blog publishing faster in addition to making site wide design changes easier.

This document will give users an overview of some the enhancements made to Movable Type’s templates and help users update their templates to take advantage of these features.

What’s New - an Overview

Here is a list of just some of the new features and enhancements made to Movable Type 4.0’s templates:

  • New archive types giving publishers a greater range of the types of archives they can create including a variety of category and author archives.
  • Paginated archives allowing publishers to generate more page views, increase ad revenue and speed up publishing.
  • Consolidated archive templates preventing designers from needlessly editing multiple templates that are virtually identical - now edits can happen in one template to affect archives site-wide.
  • Restructured default blog templates to easily affect the look and feel of their entire site (not just archives) by editing fewer templates.
  • New widgets have been added to make blogs more dynamic and richer in content, such as a “Recently Uploaded Photos” widget and more.

New Archive Types

Here is a list of the archive types available in Movable Type 4.0:

  • Entry
  • Daily
  • Weekly
  • Monthly
  • Yearly
  • Author
  • Author-Daily
  • Author-Weekly
  • Author-Monthly
  • Author-Yearly
  • Category
  • Category-Daily
  • Category-Weekly
  • Category-Monthly
  • Category-Yearly
  • Page

New Archive Templates

To reduce the number of templates a designer would need to edit to affect changes to their archives, the Date-Based Archive and Category Archive templates found in Movable Type 3.x, which had about 99% in common with one another, have been merged into a single template named “Entry Listing.”

Here then are the three archive templates that new blogs are populated with in Movable Type 4.0:

  1. Entry - default template for publishing an entry (previously individual entry archive)
  2. Entry Listing - default template for all archive lists of entries
  3. Page - default template for publishing a page (sister to Entry archive template)

Archive templates are mapped to archive types to determine which template publishes which archive type. Archive types are managed at the bottom of each edit template screen.

Upgrading Your Movable Type 3.x Templates

The archive pagination that is introduced by Movable Type 4.0 has shown to increase build times by at least 20%. So while Movable Type 4.0 may actually be publishing more (in regards to the number of files), publishing time overall is decreased because the size of each file being published is smaller.

Users who have upgraded from an earlier version of Movable Type can take advantage of this enhancement by making a few changes to their existing Movable Type 3.x templates.

Paginate Your Category Archives

The first thing to make the changes necessary to paginate your category archives.

  1. Navigate to the edit screen for your Date-Based Archive template. At the bottom of the page click the “Create New Archive Mapping” button.
  2. Select “Category Monthly” (or Daily, Weekly or Yearly)
  3. Click the “Add” button

Edit Your Category Archive Template

Now, let’s reduce the number of entries that get displayed on your Category Archive pages to decrease the time it takes to publish them.

  1. Edit your Category Archive template.
  2. Look for the <MTEntries> tag found in that template and change it to <MTEntries limit="auto"> or <MTEntries limit="10">

Setting limit to “auto” limits the output to the number of entries or the number of days of entries specified as the Entry Listing Default in Entry Settings. Specifing a specific number limits the output to that number of entries. The limit modifier is only available in the context of an archive template.

Now that your category archives do not display the entire contents for that category, you will need to provide links to the category archives. The following code will produce an index of the various months within the current category that have entries available:

<mt:ArchiveList archive_type="Category-Monthly">
  <a href="<mt:ArchiveLink />"><mt:ArchiveTitle /> (<mt:ArchiveCount />)</a>

Place this code at bottom of your Category Archive template. An advanced option would be to place this code in a conditioned block of code in a sidebar template; find an example of this code in one of the sidebar templates of the MT4 default blog templates.

Create a Page Archive Template

To take advantage of Movable Type’s Pages feature, you will need to create a page archive template and mapping.

  1. Create a new archive template called “Page”
  2. Copy the contents of the “Individual Entry Archive” template in to the new “Page” template
  3. At the bottom of the template click the “Create New Archive Mapping” button.
  4. Select “Page” and click “Add”
  5. Save the template
  6. Now when you create new pages, they will use this template.

You can optionally use an adapted version of the Individual Archive Template for your pages.

For the Brave at Heart

Though it may be time consuming… in order to take advantage of all the new features, new archive types, new template tags, new widgets, new template strucure and more… we highly recommend using the Movable Type 4.0 default blog templates and re-implementing your site’s design.

Implementing your site’s design using the new blog templates will be much simpler than it was with MT3 blog templates due to the restructured templates.


1 Comment

Robert Green

Robert Green on August 23, 2007, 6:38 p.m. Reply

This is a good start for doing a basic template update, but I went ahead and incorporated all of my changes into the new templates and documented what is required to do that along the way. So, if you are the brave of heart, follow my directions here -