In order to produce a highly relevant feed for the OLPC planet, I wanted to provide an RSS/Atom feed of just that category in my blog, something that MT (annoyingly) doesn't do automagically by default (which I think it should).
No worries, though - MT is bar none the most customizable and extensible blogging platform that I've worked with (which is not many - just Blogger, some Wordpress, and MT). So knowing that, I figured that I'd try and figure out how to do it. I came up with Google searches that were less than helpful, telling me to go places that simply don't exist (they must be referring to older versions of the software).
So I took the general concept from those posts, and assumed that it would apply to the new version. It does, sort of - but the convoluted process that they point you at is much easier in 4.32. Without further ado, here's what I did:
No worries, though - MT is bar none the most customizable and extensible blogging platform that I've worked with (which is not many - just Blogger, some Wordpress, and MT). So knowing that, I figured that I'd try and figure out how to do it. I came up with Google searches that were less than helpful, telling me to go places that simply don't exist (they must be referring to older versions of the software).
So I took the general concept from those posts, and assumed that it would apply to the new version. It does, sort of - but the convoluted process that they point you at is much easier in 4.32. Without further ado, here's what I did:
- In the blog dashboard, go to Design/Templates
- Select the "Feed - Recent Entries" template
- In the "More Actions" up at the top, choose "Clone Template(s)"
- Click the little arrow at the bottom for Template Options
- Change the output file to something else (I used olpc.xml for instance)
- In the actual body of the template, where you see '<mt:Entries lastn="15">' just change it to <mt:Entries lastn="15" category="OLPC> for instance.
- Save and publish the template, and everything should be good!
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=07382978-af1a-4ab5-8db2-902f7461bc04)


This is fine if you only ever want to produce one(or maybe a few) category feeds. Beyond that, you're probably better off creating a new Entry Listing template(type Category) and dumping in the regular Recent Entries template you used[1]. Since this makes it a category template, they will all automatically limit themselves to the category in context at the moment.
[1] You might want to make a couple text-based tweaks to the feed's title element to identify it better, but that's it.
Yeah, there are a few other things wrong with it to, which makes the Entry Listing template and some customization of the HTML header for a category page the right thing to do.
For instance, even though there's a little RSS icon provided by the browser, it links to the wrong feed than you would naturally think it should be - the global feed rather than the category feed. This is controlled by the "link rel="alternate" type="application/atom+xml...." line at the top of the HTML Head template module. My knowledge of MT still being somewhat lacking (I could have probably done this with an if/else), I copied that template module into a new one, changed the location of that to $mt:ArchiveLink$atom.xml (insert brackets where appropriate :) ), and used that in place of HTML Head in the include of the category archive template.
One more important thing to note is that the link to itself in the feed is wrong, again I fixed that by changing the link to $mt:ArchivePath$atom.xml
To make this work also, you need make an category archive mapping of "%-c/atom.xml" on the feed template.