Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


How do I customize my archive filename format in Movable Type 4?

I've been using Movable Type almost as long as you have, Dave, and just noticed that the way you name your blog entry archives is pretty different to how Movable Type 4 does it by default. I'm setting up a new blog for my sister and would like to see if I can mirror your archive filename format. My question is: how do you change the template file naming scheme in MT4?


Dave's Answer:

What we have here are two cases of imitation being the sincerest form of flattery, I think. First off, I appreciate that you want to mimic how I've been doing things for quite a long time, but it's also interesting to see that the default file naming scheme for Movable Type appears to have changed when they switched from MT3 to MT4, switched to mimic what WordPress had been doing for a while.

Specifically, MT used to have individual archive filenames look like this:

http://domainname/beginning_of_blog_title.html

Then WordPress came along and they realized that it is possible to have more than one blog entry with the same title, even if rather inadvertently. To avoid that, they use the date as part of the filename:

http://domainname/YYY/MM/beginning_of_blog_title.html

So a blog entry published on May Day of 2009 might look like 2009/05/my_blog_entry.html

Not exactly how I like to organize things, as you can see by checking out the URL for this page.

To make this change in MT, however, is a bit tricky, especially if you're used to MT3, as I have been for so many years!

Here's the path you need...

Start by going to the templates area of the design menu:

mt4 design templates

About halfway down the page, you'll see the default template for individual, category and date archive pages:

mt4 archive templates

What I'm going to change here is the individual entry template: the others I will leave as-is because they're fine, and it makes some sense for date archives to be neatly tucked into different directories, I think, anyway.

To get to the individual entry, I click on "Entry", as shown above. The result is a page that shows the actual MT template, but if you scroll down (the secret!) underneath that you'll see:

mt4 template options

That's where we want to make these modifications. Click on the little triangle adjacent to "Template Options" and it opens up to show you the configuration. Click on the menu there and you'll see there are quite a few archive template choices:

mt4 template archive mapping

Since I want to do something that's a bit off the beaten track, apparently, it's not a default choice, so I'll have to pick "Custom..."

This puts me here:

mt4 template archive mapping default

Now I need to learn the secret "%" language of the MT template. Fortunately, that's exhaustively defined here: Archive file path specifiers in MT4. By reading that, I learn that what I want is to use %b%x to get the title of the blog entry followed by the standard filename suffix (".html" in this case). If I wanted to use dashes instead of underscores, I'd make it "%-b" instead, and on my new weblog, I'm actually using the template "%-b-%E%x" to add the entry number as a way of sidestepping the possibility of two blog entries with the exact same title.

I hope that helps you tweak Movable Type to work exactly as you need.


More Useful Blogs and Blogging Articles:
✔   Get my shopping cart plugin to work with WordPress?
We've put in a shopping cart for a client that's not working, and we need some help! The cart is currently using the...
✔   Embed an audio player on a blog or web page?
I have some mp3 audio files I've recorded and would like to have people who visit my site be able to listen to...
✔   Can I write a guest review for AskDaveTaylor.com?
Hi Dave. I'm a big fan of your site and love that you're doing so many reviews now. I've noticed, however, that there...
✔   Change author on WordPress blog post?
I have two accounts set up for my WordPress blog and I'd like to be able to have all my posts from a...
✔   How do I restructure my Wordpress blog without losing SEO?
I have a wordpress blog that was using categories in the url structure like this: /category_name/post_name/ Then I had read somewhere that if...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  




Categorized: Blogs and Blogging , HTML, JavaScript and Web Site Programming   (Article 8867, Written by )
Tagged: blog customization, blogging, movable type, seo, wordpress
Previous: Are ad placement and size a factor in PPC revenue?
Next: How do I connect to a new Wifi network in Windows Vista?




Reader Comments To Date:

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
Rather amazingly, there are no comments on this article yet.

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.