I managed to make a lot of progress on the EduTech website redesign yesterday and hope to continue it today. I got the latest Movable Type 3.2 beta release, Beta 4, installed on my PowerMac after compiling Perl DBI and SQLite (they whole “compile a program from its source code” thing is getting less scary each time I do it). So, I’ve now got a nice little development “sandbox” where I can play around and break stuff without affecting anything on our live website.
So anyway, my first impressions of the new Movable Type:
- Six Apart has spent a lot of time on this release, making a ton of changes and adding many new features.
- The new, streamlined interface is great – much easier to navigate.
- Administration, including comment and trackback management, is now better
- It’s much easier to use it as a content management system
[Geek Alert] Keep reading for some of my lessons learned so far.
Many of my assumptions were tested in getting content from Movable Type into the new website layout. This was a very Good Thing – I quickly found the flaws in my logic and came up with fixes for them.
I’ve split up the master page template into two pieces, header and footer, which are pumped into the MT index template using a PHP include statement. This works well except for one big: you can’t put Movable Type tags anywhere in those two files. Why? Since they’re dynamically inserted each time the page is requested, MT isn’t able to process them.
The workaround: At the top of the template, assign the Movable Type tags/variables to PHP variables and then use them inside the header and footer. Here’s an example:
<MTEntries lastn="5" offset="3"> <?php $previous = '<li><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></li>'; ?> </MTEntries>
And here is it being used in the footer template:
... <h3>Previous Announcements</h3> <ul> <?php foreach ($previous as $link) echo $link; ?> </ul> ...
I was also able to get the Key Values plugin working successfully. This simple little tool lets me pass information from one of the entry fields to the template by adding something like category=support to the keywords area. Then, using the technique demoed above, I can use that value in PHP to dynamically change the layout of the page. Very nice!
It’s a good start. I can potentially get everything up and running on my development machine and then move it to our production server when it’s time to launch. Hopefully the final release of MT 3.2 will come soon!