Now blogging at diego's weblog. See you over there!

RSS fixes


As usual, something wasn't completely right with the new design. Jonas, in a comment, pointed out that the RSS feed for the site was using excerpts rathen that the full entry body. That's an easy enough fix. Then I wanted to add the RSS feeds for categories. That turned out to be slightly more complicated (but not as much as I expected), a little digging through the MT docs was enough. Here are the steps:

  • Get an MT RSS template, and copy it into a text editor somewhere (any of those in the Index Templates list --accessible with the Templates option in the MT blog menu-- will do. I chose RSS Index 1.0).
  • In the same Templates page, choose "Create new archive template" from the "Archive-Related Templates" section.
  • Create the new category by typing in a name (I used "Category RSS Index 1.0") and copying back the text previously pasted on the text editor.
  • Now the template has to made active. For that I had to go into Blog Config, option "Archiving", and select "Add New". For "Archive Type" I selected "Category" and for "Template" I selected the one I had just created ("Category RSS Index 1.0" in my case). Before saving the configuration, I set the archive name to a combination of category name and "-index.rdf" by setting the name as follows: "<$MTArchiveCategory dirify="1"$>-index.xml" (without the quotes).
And it's done! Rebuilding the archive files automatically built the category RSS indexes.

Finally, I added the links to the page by modifying the loop that creates the list of categories with links as follows:

<div class="sidetitle">
Archives by Category
</div>
<div class="side">
<MTCategories>
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a> (<a href="http://www.dynamicobjects.com/d2r/archives/<$MTCategoryLabel dirify="1"$>-index.rdf">RSS</a>)<br>
</MTCategories>
</div>
(The text in bold is the addition to provide links to the RSS feeds to each category).

Now, the next step is to configure the Creative Commons License and the RSD file...

Categories: technology
Posted by diego on February 28 2003 at 3:51 PM

Copyright © Diego Doval 2002-2011.
Powered by
Movable Type 4.37