
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? 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: ![]() About halfway down the page, you'll see the default template for individual, category and date archive pages: ![]() 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: ![]() 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: ![]() 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: ![]() 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.
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon
Categorized:
Blogs and RSS Feeds
,
CGI Scripts and Web Site Programming
(Article 8867)
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? Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.
Rather amazingly, there are no comments on this article yet.
I have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
![]()
Search
Find just the answers you seek from among our 2300+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Industry News and Trade Shows Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Book Links
|