tips and tricks for movable type

generate RSS feeds by category
May 02, 2003

You can offer your readers syndication feeds by category using MT's Multiple Archive Templates feature - credit for this trick goes to Ben Trott.

1. Go to List Templates and select your RSS template for editing. Select and copy the code in the Template Body window.

2. Go back to List Templates and select Create new archive template. Give the template a name such as Category RSS. Paste the code from your RSS template into the Template Body window, and select SAVE.

3. Go to Blog Configuration | Archiving and select ADD NEW. In the popup window, choose Category Archive for the archive type and Category RSS for the template. Select ADD.

4. For the new template you've just added, set up an Archive File Template with this code:

<MTArchiveCategory dirify="1">.xml

SAVE your changes.

5. Rebuild your Category Archives. MT will generate an XML file for each category in your archives folder.

6. You can list these feeds on your site using the following code:

<MTCategories>
<a href="<MTBlogArchiveURL><MTCategoryLabel dirify="1">.xml"><MTCategoryLabel></a><br>
</MTCategories>

Comments

And I hope we'll be treated to some category RSS feeds here, soon! :)

by Kevin | 05.04.03 06:04 AM

wow its very useful .. :), i'll use it.

by achmadbiz | 05.04.03 09:21 AM

Oh, gosh! The pressure! =)

I'll be adding a syndication link soon, so I guess I could do the category ones as well.

by girlie | 05.04.03 10:31 AM

Thanks for this tutorial; I put the RSS links next to the category links, seperated by a pipe. Tested it in my aggregator...neat!

by Sherri | 07.15.03 10:12 PM

G - This works great. We're going to be using it over at Fanblogs.com and I'll definitely include the credits on our credits page.

by Kevin | 08.09.03 09:42 AM

How did change the code so there is an RSS link next to each category that matches the category archives being generated on the sidebar?

http://npoblogs.org/npoblogs

by bagus | 08.25.03 05:20 PM

Great tip! I have it implemented on my site but have a question. Is there anyway to make the RSS feeds from the categories also include the excerpts from the aggregated RSS feeds into that category.

We are working on a site that aggregates nonprofit related RSS feeds into categories. I would like to allow folks to subscribe to individual categories, but still be able to read the excerpts from the recent postings. Is that possible?

We are using a borrowed template from mt-plugins page, but will change as we get the beta working. Any help is greatly appreciated.

http://npoblogs.org/npoblogs

by bagus | 08.25.03 07:54 PM

What's the answer to "How did change the code so there is an RSS link next to each category that matches the category archives being generated on the sidebar?" I would love to know! :)

by Geoff | 12.18.03 02:53 PM

I implemented your category RSS and it works great.
But then I discovered a problem. I already had a categories archive on my index page that also included # of entries in each.
Now that I made the RSS archive both RSS and the original Cat archive returns the RSS feed. Is there a way to include both or do I have to revert back to original config and give up the idea of having a RSS feed for each category?

Thanks....Marc

by Marc | 12.29.03 01:51 AM

I am trying to do this so that I can generate a feed for all my indiv. arch.

I followed the steps above except instead of Add New->Cateogory I selected Individual. Now instead of Archive File Template -> .xml what must I do?

Thanks for the help!
Eli

by Eliah Holiday | 12.30.03 02:50 PM

Thanks for this little trick. Big help really.

by The Sassy Lawyer | 01.05.04 09:04 PM

For anyone reading this to have both the RSS and the HTML pages, make sure to have the category selected, not the rss, then it will work fine.

by Mike Wills | 01.26.04 11:18 PM

<a href="<MTBlogArchiveURL><MTArchiveTitle dirify="1">.xml"><MTArchiveTitle></a> is the way to generate the necessary link on one's home page automatically as Girlie has now revealed over in the MT Support forum...

by David Brake | 01.31.04 12:16 PM

(after replying to a forum post, I thought I'd add this!)
If anybody is having problems with all of your category links showing up as the .xml filename, then you probably changed the radio button in Weblog Config: Archiving around. Make sure the radio button that is selected is next to the regular html category archive template. That's what determines where the permalink goes to.

by kristine | 03.31.04 01:57 PM

I tried the advice above, but the HTML category index does not update- even when using the tips given in the commnts here (I am using MT 3.11).

Any idea how to have them both work?

Thanks!

by xslf [TypeKey Profile Page] | 10.06.04 02:32 PM

It worked like a charm on MT 3.15. Thanks for the tip.

by CJ [TypeKey Profile Page] | 05.04.05 03:34 PM

I just upgraded to MT 3.1/3.2 and noticed that 4 does not work anymore. The category name does not get expanded and i ended up with a file <MTArchiveCategory dirify="1">.xml on my harddisk.

Any idea?

by arved [TypeKey Profile Page] | 09.25.05 12:41 PM

I just followed all the steps in 3.2 and they worked correctly for me - a file was generated for each category name, with an .xml extension.

These steps are based on versions prior to 3.2 of course; for step 4, there's no specific field called "Archive File Template" in 3.2 now - it's "Archive File Path" under Archive Mappings on the Publishing settings page; and you have to select Custom... from the dropdown menu in that column for the new template you added, then paste the code there and SAVE.

by girlie [TypeKey Profile Page] | 09.25.05 01:01 PM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 28
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/146)

» That's enough for today.
Excerpt: Thanks to the love of my life all of the old posts are moved to this site now. I also
Weblog: Pick A Bar
Tracked: 06.07.03 03:21 PM

» Category based RSS feeds
Excerpt: This blog now has category based RSS feed thanks to a great tip from the girlie. One thing you need to watch out for is in step four is not to have any trailing whitespace. If so, MT blindly tacks on hidden spaces to the ends of your file names, which ...
Weblog: Ravings of an intermittent fool
Tracked: 08.25.03 08:56 PM

» Category archive RSS feeds now available
Excerpt: I have added category specific RSS feeds for those only interested in my weightloss happenings or those only interested in Information Security posts. If you want to monitor updates on my humble take on security issues and eliminate some of...
Weblog: Bowulf Infosec & Weightloss Blog
Tracked: 09.13.03 12:07 PM

» XML for Categories
Excerpt: I'm pleased to announce the arrival of The Daily Weblog's new category newsfeeds, for those who only want to read about a certain topic in their newsfeed readers. Cheers to the girlie matters for this very useful tip (among many...
Weblog: VANTAN.ORG: The Daily Weblog™
Tracked: 10.06.03 01:12 PM

» Feeds RSS para tus categorías
Excerpt: Qué interesantísimo truco que acabo de implementar a mi Movable Type para poder obtener los feeds RSS de cada una de mis categorías creadas. Este truco se lo debo/emos, una vez más :), a the girlie matters que es donde...
Weblog: Enrique Barbeito García v3.0pre1
Tracked: 11.22.03 04:29 AM

» generate RSS feeds by cat
Excerpt: [the girlie matters] tips and tricks: generate rss feeds by category...
Weblog: Shawn's Weblog
Tracked: 12.06.03 04:29 PM

» Structure Changes
Excerpt: As much as I love the poker blogs that I link to and others that I read, I have made the decision that this will not be a poker only blog. It may turn out that it is mainly that,...
Weblog: Chris Halverson's Blog
Tracked: 12.11.03 11:00 PM

» Generate an RSS feed of an MT category
Excerpt: From [the girlie matters] tips and tricks: generate rss feeds by category. Remind me to try this, somebody, OK?...
Weblog: [supafine] geek blog
Tracked: 01.06.04 01:12 AM

» Everything you wanted to know about RSS
Excerpt: Something to review... Scripty Goddess blog entry Movable Type support forum thread generate_rss_feeds_by_category p....
Weblog: My Messy Workbench
Tracked: 01.09.04 12:49 AM

» Category RSS Added
Excerpt: Many thanks to Girlie's Tips about how to generate RSS feeds by category. I was able to add the codes on all templates and category entries are now RSS readable. Next I'd like to know is how to make a template for my side links entries. I am tired of u...
Weblog: Laila's Weblog - A Journey Through Life
Tracked: 01.16.04 07:51 AM

» Category RSS Added
Excerpt: Many thanks to Girlie's Tips about how to generate RSS feeds by category. I was able to add the codes on all templates and category entries are now RSS readable. Next I'd like to know is how to make a template for my side links entries. I am tired of u...
Weblog: Laila's Weblog - A Journey Through Life
Tracked: 01.16.04 08:08 AM

» If you aren't an RSS/weblogging geek read no further
Excerpt: Thanks to a Bloggie award nominee and extremely helpful person I have managed to generate rss feeds by category for my site. What I can't yet figure out how to do is dynamically generate the links to the XML files so they can show up on the category pa...
Weblog: Blog.org
Tracked: 01.22.04 08:48 AM

» Some changes
Excerpt: Well, first of all, I have added category RSS feeds. Check out the right side to see them. Thanks to this post by "the girlie matters" to help me set it up. Also, I have removed the old posting format so, you will now have up update your links. I told ...
Weblog: Koldark's Komputer World
Tracked: 01.26.04 11:05 PM

» I'll feed you
Excerpt: As I noted two months ago, I want an RSS feed for my sideblogs. Thanks to Girlie Matters, I got me one. Another thing to check off the list!...
Weblog: [supafine] geek blog
Tracked: 03.02.04 09:40 PM

» Movable Type Category-Based RSS Subscriptions
Excerpt: I've added a separate XML feed for each MT category
Weblog: LawLawLaw: Erik J. Heels
Tracked: 04.07.04 03:42 PM

» Nine Fluffed Cats Strutting Blogways
Excerpt: I've added nine categories to Earth Wide Moth.  Wanted to move toward readability and organization.  I just thought about my interests, the entries over the last three months, where I see future entries fitting, then dummied up some fun(ky) c...
Weblog: Earth Wide Moth
Tracked: 04.09.04 10:10 PM

» Simple RSS Customizations
Excerpt: The default Movable Type installation automatically publishes RSS feeds for your weblog. The most widely used template - RSS 1.0 Index - generates an RDF file, index.rdf. The default setting on this file produces a feed with the entry excerpt. Here are...
Weblog: Learning Movable Type
Tracked: 05.10.04 10:57 AM

» Category based RSS feeds
Excerpt: This blog now has category based RSS feed thanks to a great tip from the girlie. One thing you need to watch out for is in step four is not to have any trailing whitespace. If so, MT blindly tacks on hidden spaces to the ends of your file names, which ...
Weblog: Ravings of an Intermittent Fool
Tracked: 07.24.04 11:54 AM

» Aggregerad kultursväng
Excerpt: Jag vill ha flöden! Jag pillar lite med en webbtjänst som aggregerar rss-flöden inom kulturområdet. Dels har jag influerats av...
Weblog: Det perfekta tomrummet
Tracked: 07.25.04 07:52 AM

» RSS feeds for categories
Excerpt: [the girlie matters] tips and tricks: generate RSS feeds by category...
Weblog: Blogsters
Tracked: 08.25.04 10:52 AM

» Category RSS Feeds Up
Excerpt: It's taken a while, but not only do I have category archives, but I now have individual feeds for each category, thanks to some tweaking of the information at the girlie matters by way of Ravings of an Intermittent Fool....
Weblog: Belief Seeking Understanding
Tracked: 12.24.04 04:59 AM

» More fun with MT
Excerpt: I am currently trying to update another UWinnipeg blog used to promote our "information resources (http://blog.uwinnipeg.ca/InfoResources/), which we are featuring a bit more prominently on our website through our rss feeds (thus the need to make it a ...
Weblog: The Do-It-Yourself Librarian
Tracked: 01.11.05 01:42 PM

» Now on Java.Blogs
Excerpt: After a bad day at work, I decided to try and get something accomplished. I never really looked into it before, but wanted to get a category based RSS feed working on my MT 2.6 installation so that I can...
Weblog: Doug's Blog
Tracked: 01.14.05 12:36 PM

» Nine Fluffed Cats Strutting Blogways
Excerpt: I've added nine categories to Earth Wide Moth.  Wanted to move toward readability and organization.  I just thought about my interests, the entries over the last three months, where I see future entries fitting, then dummied up some fun(ky) c...
Weblog: Earth Wide Moth
Tracked: 02.03.05 12:08 AM

» Category-based RSS Feeds
Excerpt: It occurred to me that some of my readers might be interested only in politics, while others would be interested only in triathlon. Following the instructions from the girlie...
Weblog: Yesterday's Thoughts
Tracked: 06.13.05 01:45 PM

» Category-based RSS Feeds
Excerpt: It occurred to me that some of my readers might be interested only in politics, while others would be interested only in triathlon. Following the instructions from the girlie...
Weblog: Yesterday's Thoughts
Tracked: 06.13.05 01:59 PM

» Category RSS
Excerpt: Look what I''ve found, although Michelle Chua has probably found it ages ago....
Weblog: Until now, all is well
Tracked: 08.10.05 03:42 PM

» RSS Feeds for Each Category
Excerpt: I spend a lot of times organizing my entries into categories, so that the audience I support can focus their...
Weblog: e3 Information Overload
Tracked: 11.30.05 12:06 PM