« templates_c problem and the easy upgrade | Main | Barebones Individual archive template »

Updating your templates for v3.2

This is an archived entry from the Movable Type 3.2 beta test.
Entries from the current beta release (v3.3) can be found here.

In developing new versions of Movable Type, we always strive to maintain backwards-compatibility with templates from previous versions. However, as the application becomes more advanced, so too do the templates. This means that to take advantage of new functionality, it is important to also upgrade your templates.

Movable Type 3.2 introduced a number of features which provide you more control over the way comments and TrackBacks are accepted and how they are treated after submission. Many of these changes require the new template structure to be in effect. In addition, the new templates allow you to see changes you make in your feedback settings after only rebuilding your weblog's index templates, as opposed to all of your individual archives. For those of you using static templates, that's a huge win, despite the new and cool animated rebuilding icon. :-)

Making it easier

To aid you in converting to the new templates we've done two things. First, we made a huge effort to greatly simplify the comment and TrackBack template tag structure which became so complicated upon the debut of TypeKey authentication. In Movable Type 3.2, we've pared back and hidden away much of the necessary Javascipt logic and introduced some powerful template tags that just do the right thing.

Secondly, today we are releasing the Template Refresh plugin. This plugin allows you to get the latest default templates while still preserving (as a backup) your old templates.

How the TemplateRefresh plugin works

The TemplateRefresh plugin allows you to refresh one or more templates to the latest default templates shipped with Movable Type. In doing so, the current template is copied to a backup and labelled as such. In addition, the new template will inherit all settings of the old template and the old template will be disabled.

This allows you to quickly utilize the new templates shipped with Movable Type while still keeping your old ones around so that you can port your changes into the new templates.

Installation of the plugin

Installation is as simple as most other plugins. Download the archive, unpack it and upload the TemplateRefresh directory to your Movable Type plugins directory. The plugin is now in effect.

Refreshing all templates on a weblog

Go to the Weblog listing screen in the System Overview. Select a weblog and choose "Refresh Template(s)" from the action bar dropdown. All of the templates in that weblog that match default templates will be copied to backups and refreshed with the new code and settings.

This is the preferred way to execute the plugin because it is the only way currently to refresh System plugins and will add crucial templates which did NOT exist in previous versions (e.g. the Site Javascript templates).

Refreshing single templates

Go to your weblog's template listing screen and select one or more templates. Choose "Refresh Template(s)" from the action bar dropdown. Assuming you've chosen templates which match one of the default templates by name, your selected templates will be copied as backups and be updated with the default tags, structure and settings.

This method is great for simply getting back to the default template if you've messed up beyond repair.

Customize

After you refresh your templates, you can then take the time to copy over any modifications you've performed in the past, like adding template modules or sidebar elements. I would caution you however against messing with the HTML structure (e.g. divs and class/id attributes) for a reason that we will soon explain. Trust me on this one. You'll love us for it.

TrackBack

Listed below are links to weblogs that reference Updating your templates for v3.2:

» MovableType 3.2 get's more and more perfect ... from Lutz-R. Frank MT 3.2
The Beta Version of MovableType gets more and more perfect, rebuild speeds are impressive, the whole blog handling got - even more (if this at all been possible) professional. The new Template refresh plugin allowed my site to use now... [Read More]

» New Templates Are A Pain from Jerm's Blog
Movable Type 3.2 is starting to be a pain in the ass. If I started my site from scratch, it... [Read More]

» using default templates from Tim Buchheim
I've switched to the default MT 3.2 templates. They're pretty decent. I may go in and customize them at some point, but it will probably be a while before I get around to it. The new TemplateRefresh plugin is... [Read More]

Comments

That's very helpful of you :) ..next release: MT 3.foolproof

..so when comes the MyAss3 plugin ;) (yes, I took screen shots)

Ha! Funny. A guy makes a mistake and you never let him forget it, do you... :-)

heh, hell no :)

Jay,

Feeling bold, and after playing around with beta 1, I decided that I would install beta 1 20050723 on my main site this morning.

What I found out is VERY disturbing. My MT-Blacklist AND SPAMLookup refuse to work any longer. Additionally, the "trusted" commenter feature simply does not work, even after I have gone and "trusted" all of my regular commenters.

Reading through the Beta Blog post about certain known bugs can be very fundamental.

Would it be terrible hard to make an extra tab on the templates screen for those backups? Right now it's mighty confusing to look at with backups and live templates mixed in.

Political Pulpit, nothing should be "disturbing" in a beta test. We've said very, very clearly that there will be bugs, possibly of the data destroying variety. The whole purpose of this period is to find them and squash them.

So, with that in mind, you should file bugs if you believe you have found some.

FWIW, I'm using beta-2 on my site and SpamLookup is working just fine. I'm not using Blacklist (because SpamLookup does it all for me), but others who are don't seem to be having any problem after applying the hack Carla linked to above.

"Would it be terrible hard to make an extra tab on the templates screen for those backups? Right now it's mighty confusing to look at with backups and live templates mixed in."

Actually, at this point in the game, yes -- very hard indeed.

Anyway, the transition period during which you have both templates and their backups shouldn't last too long, should it?

I can get used to it ;) Just took me a bit by surprise seeing it all there.

The template refresh plugin is very good. I notice that the new main template is sans calendar. Is that the plan for the new MT 3.2 template? And if so, will there be an easy way to add it back in afterwards? Again, great plugin!

The calendar code will be included in the documentation, but we've found that most people remove it straight away because unless you're using daily archives, it only points to the latest entry on that day AND it slows down rebuild times dramatically.

I'm updating my template now (since it's pretty custom) and noticed there's an ID in the new template: "layout-two-column-right"

Is that hinting at what I think it's hinting at?

I noticed that a link to the master archive list in the index template is hardcoded as archive.html

Is that hinting at what I think it's hinting at?

You'll have to wait and see. We'll be talking soon, I promise.

I noticed that a link to the master archive list in the index template is hardcoded as archive.html

Unless I misunderstand what you're talking about, that has been the case since v1.0. It probably should be <$MTLink template="Master Archive Index"$>

I have never noticed it being hardcoded as .html, of course it's been so long since I've used just the standard templates (Once I got over the fear of the templates).

Actually there are seven hard-coded values. I've filed a bug on this. Thanks Sara.

Just a quicky... Is it right that the System Templates can't be refreshed?

If not then I'll log a bug... :)

They can, on the System Overview » Weblogs listing.

They cannot on the weblog's template listing. Don't bother filing a bug. We've already got one on it.

Under an old template, if I uncheck "Accept Comments," the "Comments" link vanishes... as do any previously published comments for that entry.

I'm still trying to gather information for a bug report and ascertain if it only happens with the old (3.0-3.17) template structure. (I ran MT-Close a few weeks ago and the problem posts are in that group.) But has anyone else seen this?

I'm guessing it's your template. I'm using a fresh install of the most recent current nightly (3.2b-20050723) and I just tried unchecking accept comments on an existing entry. The comments(x) link is still there on the index page at the bottom of the entry (as expected), and if I go in, it shows all existing comments but there is no comment form to add new comments (as expected).

Yeah, it is indeed the old template. When I replaced the old comment tags with the new comment code from the new template, the comments worked correctly.

Workaround is to replace old comment code with new comment code on all the templates (index, archives). I don't like that solution, but it does the job. Other option is to just upgrade to the new templates.

I've filed a bug report.

I've noticed when I published an entry and notice moments later I made an error in grammar or spelling, when I edit the entry, it is duplicated in my date-based archives, like so. As you can see in my July archives, for each edit I made, a duplicate post was added. I've checked this on a fresh install, and the same thing happens.

Anyone else notice this?

I've noticed when I published an entry and notice moments later I made an error in grammar or spelling, when I edit the entry, it is duplicated in my date-based archives, like so. As you can see in my July archives, for each edit I made, a duplicate post was added. I've checked this on a fresh install, and the same thing happens.

Anyone else notice this?

hehe.. there's a certain irony in that double posting :)

hahaha, I didn't catch that. smile

I just noticed the same problem with duplicate postings in my (dynamic) category and monthly archives. Every time I re-save an entry it adds it again to those archives. Happens both with my upgraded blogs and a newly created (with MT32b2) blog.

Hi kate. I responded to your comment in the User-to-user support thread. We're trying to keep support discussion in that one thread and I'd appreciate it if you could help us do that. Thanks.

Following installation of the plugin, I'm now getting this:

Build error in template 'Atom Index': Error in tag: Error in tag: Could not create atom id for entry 1123

Thoughts?

One word of warning ;) - make backups of your templates manually before running it! At least in my case - a heavily customized one - it did a reset of the templates without making backups himself :(

That was fixed in MT3.2b-20050723

I must say that I'm liking the modifications to 3.2. The Remember Me module really simplifies my templates. Thanks!

There is one thing I'm wondering if it could be inserted at some stage: the ability to filter for posts that have no category. If you've imported a lot of posts and they don't get categorized properly, it can be a little hard to select those that don't have a category. The filter only allows you to select for a particular category.

There are actually a few places where this would be really useful and cannot be done. We have a feature request in our tracking system on this functionality. I don't know if we'll get to it in this release considering the work we still have to do to fix bugs, but if we can, we will.

Thanks James.

In addition, the new template will inherit all settings of the old template and the old template will be disabled.

I take it this means the database settings of the template, not the actual contents of the template itself. It appears that the new default templates do things like replace my style sheet which seems unnecessary.

I'm sure that this plugin is great for many users, but if you have customized your templates to any degree, no so.

For my purposes, it would be more useful to have a set of context diffs between the old versions of the default templates and the current versions. In the best of all possible worlds I would be able to use these to automatically patch my heavily modified versions of the templates. In this world, I'll settle for patching them by hand.

I'll do this myself with the 3.17 templates. I see they are here listed separately in textboxes here: http://www.sixapart.com/movabletype/default_templates so getting them is a chore. I see you are including the templates with the 3.2b2. I'll be saving these for future reference.

Post a comment



Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.