tips and tricks for movable type
generating fake archives
June 13, 2003
I wish I'd thought of this, but it wasn't my idea. :banghead:
I was so impressed with Crys's cleverness when she posted this in the forum, that I just had to record it for posterity.
The obvious question is "Why would I want to create fake archives?", and the cryptic answer is "so you can fool <MTArchiveList> into thinking they exist".
Say you've got all the archiving options you want set up on your blog, but you want to do something special that requires a new archive type. If you'd rather not add yet another type (and generate all those extra archive pages), that's where this tip comes in handy.
Two examples of why you'd want to undertake this: generating a calendar for every month (the subject of the thread where this trick first appeared) without enabling "real" Monthly Archives and combining descending days with ascending entries without enabling "real" Daily Archives.
So here are the steps:
1. Go to List Templates and select Create new archive template. Give the template a name such as Fake Archives. Type a '.' or other single character in the Template Body window, and select SAVE.
2. Go to Blog Configuration | Archiving and select ADD NEW. In the popup window, choose the archive type you're faking, and the Fake Archives template. Select ADD.
3.In the far right column click the checkbox next to the old template for that archive type (i.e., Date-Based Archive) and click DELETE. Confirm the delete in the popup window.
4. For the new template you've just added, set up an Archive File Template consisting of just a simple string such as 'trash'.
5. Select the check box next to the archive type you're faking to enable the archives.
6. SAVE your changes.
5. Rebuild your Archives. MT will create a single tiny file in your archives folder.
Now, MT thinks you have archives of the type which you've just faked, and you can specify them using the archive_type attribute in MTArchiveList.
Comments
ooh, thanks a lot! :D
now i can delete all those excess daily archives. (i was the one who originally asked about descending days with ascending entries.)
Yeah! This is perfect. I was wondering how I was going to list my archives. This made it easy.
this rocks my world :) thank you!
is generating those fake listing will affect page ranking?
are those fake listings will affect the page ranking?