Simpler Movable Type templates
- At a glance
- This entry was written on August 29, 2005.
- The entry following this is entitled About those templates.
- There are 0 comments on this post.
- This entry has been tagged as MovableType, Recommended, Work.
- Archives are also available.
So, as Pam and I still slog away at laying the groundwork for our business idea, I've been signed up on a mailing list for professionals that use Movable Type in their businesses.
With the recent release of MT version 3.2, a lot (well, okay a couple) of the list's members have been complaining about changes to the default templates that come with the software. In what I personally think is a very smart move (and I'm biased because I am more designer than programmer), Six Apart, MT's parent company, decided to merge the base templates for all three of their weblog platforms (MT, TypePad and Livejournal) so that, theoretically, a designer could make one template that would work with all three platforms.
That said, the new templates are complicated. There are a lot of extra divs, spans, id's and classes in there to provide hooks to CSS; there are many more levels of work to do deciphering the code and designing for the base templates.
So, being the good community soldier I'd like to be, I pared down all of the default templates I could to their absolute bare essentials. The files almost all have nothing but very basic structural divs and link-id's. There was one case where I had to leave a nonstructural div because that's how MT links to individual comments.
I also tried to stick with MT's established naming structure on the divs I left, namely: container, header, pagebody, alpha and beta. That's it. The only other div than those five, as far as I can remember, is one on one of the comment pages to allow MT to link to each comment (I think).
In any case, the files are available as individual txt files at:
- Main Page
- Main archive page
- Individual archive
- Category archive
- Date-based archive
- Comment error page
- Comment pending page
- Comment preview page
- Dynamic publishing error page
The files are also available as one zip file here.
Everything I could check for validation and functionality, I did. I don't publish this site dynamically, so I couldn't check that one, and I didn't try the comment error one out.
As a quick aside, these were done very quickly, so I'm bound to have a minor mistake or two. When I get home from work tonight, I'll take another, slower look through them and iron out anything that's messed up.
If anyone tries these and has any major problems, or even little ones, let me know and I'll try and fix them as soon as I can.
UPDATE: In the course of going back over everything, I actually found a mistake in the default template that ships with Movable Type 3.2 for the Date-based archive that will a) always cause the created pages to fail vaildation and b) possibly cause other problems (in the unstyled version, a stray end tag shows up before the content starts). The problem is with this line of code:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<$MTBlogURL$>index.xml"$>" />
The $>" should not be there. The line should read:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<$MTBlogURL$>index.xml" />
I'm still checking the other templates to see if they have similar problems, but I have fixed the issue in the dailyarchive.txt file linked above. The Zip file I won't be able to fix until I get home from work.
At some point later tonight, I'll get these into whatever form it is that MT actually uses rather than text files that you have to copy and paste into the appropriate spot in the templates section of MT. I'll also be uploading a commented version of the main page template to give people some idea of what everything's doing.
UPDATE AGAIN: Okay, I've commented up a version of the Main Page template to kind of give a crash course on what the remaining divs do and ways to get around a couple of the divs that are missing in the sidebar.
It was available as a text file, but through some later revisions is now outdated. I'll re-comment one up tomorrow.
Keep in mind, this commented one is primarily for learning purposes. If you're going to actually use a template, I suggest sticking with the plain jane one I have linked up above. All the comments just add bulk to the final file size.
And to anyone unlucky enough to subscribe to this site and have their reader set to update whenever a page updates, you have my sincere apologies for all the fixes and updates.
FINAL UPDATE (I SWEAR): Okay, with work out of the way I was able to sit down and play with these and managed to pare them down even more while fixing the archive linking (basically, the reason I thought MT was slapping an id attribute on each and every header was for the anchor for links ... in reality? No. The anchor was in the id for one of the divs I axed, so I recreated the id and put it with the header instead).
All the links above go to new, smaller, and what I believe to be fully operational templates. They are now lean, mean blogging machines that still have a basic underlying structure that would enable a person to position the big elements (header, entry, sidebar) of the page using CSS.
The Zip file is also new, and includes all the new templates.
I've also created a fix of the default template for Date-based Archives in MT 3.2 that is available for download here. Just download it and then upload it into the default_templates folder of your MT installation to overwrite the flawed one, or open the file up with the text editor of your choice and copy and paste over the existing template within the MT interface.
On that note, I think I'm going to call it a night.
Post a comment