Recently in Movable Type

Adding tags to user entries in Movable Type

| Comment

As I am working on a new review system for one of my sites in Movable Type, I am having a lot of issues. One was how to let a user generated entry (a "review") have a field to add tags. It is hard to find the documentation or how to on the MT site, and I found the question asked on the MT Forums (but never answered), but the generous and gracious Dan Wolfgang ( emailed me the answer today, saving me who knows how many hours:

<textarea id="entry-tags" class="ta" name="tags" rows="2" cols="50"></textarea>

That line goes in your "Entry Form" template, and as long as you have the "'Tags" template included on your "Entry Detail" template you are good to go (and of course they also show up in your tag cloud, etc.).

Troubleshooting session states in Movable Type 4

| Comment
So I am running one install of Movable Type Pro (at the moment version 4.23-en with the Community Pack 1.61 and Professional Pack 1.21) but I am using this install for several projects (or trying to!). 

On a new site I am developing, I had the issue of being forgotten from page to page when logged in - or seemingly forgotten. When I would navigate within the site the sign in area at the top left would tell me "Sign In" (even though I already had) - if I clicked on "Sign In", I did become "Signed In" without actually having to go back to a log in screen.

I posted about this issue here on the MT forums, and with a hint from Rob I was able to see that in fact the cookie was not being set correctly. Then something funny happened - I clicked on a "tag" of the new site, which performs a search, and I was magically logged in again. Aha - I checked out the search template and saw that in the head of the template there is some javascript:

<script type="text/javascript"> /* <![CDATA[ */ var user = <$mt:UserSessionState$>; /* ]]> */ </script>

I added this code to the Header template module right after the open HEAD tag, and now everything seems to be working. I still have some extraneous code issues, but if you were having the same sessions issue as me, this code does seem to work.

Guestbook in Movable Type 4

| Comment

We have a new client who wanted to add a good old fashioned guestbook to their new site - so naturally we obliged. I came up with a quick and simple guestbook utilizing the MT Entry template, the Comment Form template, and a single entry. Since the site we are working on is running MT 4 but we were only using "Pages" for their content, we had the Entry and Comment Form templates available to carve up at will and didn't need to create a whole new blog (like some older examples do).

This is basically what I did:

  1. Stripped the Entry template and put my simplified code in there (the code that gives the Entries the same look and feel as the rest of the site)
  2. Added back into the body the mt:EntryBody tag (the title of the page is an image and that is hard coded in the entry)
  3. Below that, added the mt:Include module="Comment Form" tag
  4. Don't forget to make sure that the javascript link remains in the head of the document if you strip it clean like I did (hat tip to Tim Appnel)
  5. Save and publish this.

So since the only "Entry" is the guestbook itself, that is pretty much it for the Entry template. The other main modification is to the Comment Form template. Here is what I did there:

  1. Changed the instances of "Comment" to "Guesbook" where necessary
  2. Displayed the comments below the form (basically just cut and pasted the whole chunk of code)
  3. Commented out/deleted the URL field and other extraneous links and information (replies, preview, etc.)
  4. Did some styling of the template to make the comments stand out
  5. Save this and publish again.

Pagination with Movable Type

| Comment

A client wanted the option to see more posts in the same style as the index page on their Movable Type blog - we show 15 posts on the home page, and they were looking for a link for more just like that - not an archives page, not a list of links to more posts - the same thing as the home page - but just more. There are several ways to do this - but I like quick, dirty, and cheap - so we went with this example posted on

...create six templates with eight entries on each and publish them to index1-5.html; be sure to offset the entries on the page in multiples of eight (offset="8"). At the bottom of each page is a hardcoded link to the previous page of entries. On the final page (in this example, index5.html) there's a link to the archive listing where people can discover more content. This is a decent compromise for most needs: you get all the benefits of static publishing, very little of the performance impact, while still allowing users to discover your content...

In the example above they are using 8 posts a page, but we went with 15, so the offsets are of course 15, 30, 45, etc. You can see it working here (we only have one page so far as the blog is newer).

The offset value goes in the MT Entries tag: <mt:Entries offset="15">

Cloning a Movable Type Blog

| Comment

This is new in Movable Type 4.x and something I plan to be using soon:

Movable Type supports "cloning," or making a duplicate version of a blog. You may want to clone a blog in order to reuse a blog's design, it's settings and its content when creating a new blog.

When a blog is cloned, the cloned blog is an exact copy of the source blog with three exceptions:

- The blog name. Movable Type will simply prepend the word "Clone" to the new blog's title - The blog's Site URL. You will need to specify this URL in the new blog's settings. - The blog's Site Root. You will need to specify this filepath in the new blog's settings.

More info here.

Displaying Movable Type data in your static web pages: Part 1

| Comment

I admit it - I am stuck on Movable Type 3. I know I should move up to 4.2 (especially now with the latest release and community tools available), but there are so many things I am not happy with yet about 4 (i.e. file management!), and I have finally got my ahead around 3 that 4 is still too out there for me. I use it for some things (,, but until I can get much more comfortable with the template system and a bunch of other things, 3 is for me (and my clients). Also - most of what I am learning in 3 will still apply as I move/migrate to 4 when I finally manage to make the leap.

That being said, I am constantly searching for and learning how to do things with 3 - and one of those sort of mundane seeming yet hard to grasp issues (for me anyway!) has finally been solved. Specifically - I was looking for a way to include data from MT into my static, non-MT, non-CMS web pages. Eventually all of this stuff will be in MT, but I needed something now that could give me the capability to put headlines from MT into a regular HTML file (and the solution will probably work for entries, etc.).

Previously I had used a pretty horrible solution of taking the MT feed, burning it with FeedBurner, and then using BuzzBoost to embed the headlines into the home page of Caribbean-On-Line for the Travel Tips section. This had a whole set of issues involving styling the thing, having to include it with an iframe tag (don't ask!), and a lot of other assorted issues that arise from poor planning and cobbling together stuff on the fly.

So as I was searching around for how to burn a separate feed per MT Category with not much luck (which I was then going to use utilizing the system described above), I somehow, finally, had one of those light bulb goes off in your brain kind of moments - I could set up a new Archive Template, and a new Archive Mapping - the template would "publish" whatever it was that I was looking for from MT (in this case, just the last 5 entries for each category - the category name, and the entry titles linked to their respective posts), and then I could include those using SSI (Serve Side Includes) wherever I needed them in my flat HTML files. Now, maybe this is a no-brainer for some people, but I couldn't find anything on the web about it - so I decided to document the process and let all you other MT 3 users in on it. The nuts and bolts are coming in Part 2.

Enter your email address:

Delivered by FeedBurner