movabletype 4 upgrade – templates


This was the toughest part of the upgrade. And the most scary. New features to the templates are:

  • new archive types — for example category: monthly, entry, entry listing and page
  • paginated archives — not sure how useful these are to me, but it’s all good
  • consolidated archive templates
  • restructured default templates — instead of a long and cluttered file full of code, it’s now a modular system
  • widgets — what used to be includes

There are official instructions on how to upgrade 3.3 templates to 4 templates. Mostly it involves editing existing templates to fit the new version.

What SixApart called for the brave of heart only, is to use the default 4 templates in order to take advantage of “all the new features, new archive types, new template tags, new widgets and new template structure.” Why is it so daunting? Because it’s basically a fresh install, rendering all old templates inactive. In practice this means deleting all the old templates and starting from scratch.

My old templates were full of includes and little hacks here and there. I thought about it — will I lose a lot by implementing fresh templates? The answer was no. I know I will end up learning more about the system this way.

deep breath here goes.

the easy part

    1. retrieve index txt files from the backup
    2. create a new blog — I’ve talked about the recipe section for years, now is the perfect opportunity
    3. set preferences
    4. under design>templates check each template — I found that no configuration was needed and looking at the main index made me appreciate the clean-ness of the modular system
    5. check out the new archive templates — again no configuration needed, I’m still learning
    6. click on template modules — look at the building blocks


  1. configure header to show site name
  2. edit entry metadata so it shows preferred date format and category
  3. by far the most editing is in the sidebar but it’s relatively painless using widgets — I added calendar, bloglines list, buttons and an admin section; the search bar I moved down from where it was at the top
  4. talking about widgets, these are great … pretty intuitive
  5. no change to system templates
  6. save and publish (I’m getting used to calling it publish instead of rebuild)

I made a couple of new posts just to see how it all looks, and it was okay.

the hard part

  1. start with the travel section — fewest posts, and I figured this is the one section I can afford to completely rebuild if necessary
  2. check preferences
  3. under Design>templates go first to the index template section, take a deep, cleansing breath and delete all the templates
  4. with 2 tabs open — one with the current blog and one with the baseline recipes blog — copy the baseline templates one by one and create an identical new one in the target blog
  5. repeat with all templates — this will take about an hour of intense ⌘-c and ⌘-v
  6. some of the templates can be just refreshed (menu under more actions) but just to be pedantic, it’s worth double checking each one
  7. save and publish
  8. re-edit any parts that need tweaking

So that was it. Took 2 nights working till very late to accomplish. I still need to look at all the archive pages further down the hierarchy and change some of the verbage and positioning. But I consider it 90% done for every section except hidden doors. Talking about hidden doors, the modular system worked very well, I created a new module to hold the disclaimer and use mt-include on the main index to call it. The trick is to change the main index and category archive to show categories rather than entries.