Not a developer? Go to MovableType.com

Documentation

Creating an RSS template

The RSS feed template was deprecated in MT 4.1 in favor of the atom template which offers all the same functionality as RSS.

  1. Create a new index template. Name it RSS Feed and specify the output file as rss.xml. Use the following as the template code:

        <$mt:HTTPContentType type="application/rss+xml"$><?xml version="1.0" encoding="<$mt:PublishCharset$>"?>
        <rss version="2.0">
            <channel>
                <title><$mt:BlogName remove_html="1" encode_xml="1"$></title>
                <link><$mt:BlogURL$></link>
                <description><$mt:BlogDescription remove_html="1" encode_xml="1"$></description>
                <language><$mt:BlogLanguage ietf="1"$></language>
                <copyright><__trans phrase="Copyright [_1]" params="<$mt:Date format="%Y"$>"></copyright>
                <lastBuildDate><mt:Entries lastn="1"><$mt:EntryDate format_name="rfc822"$></mt:Entries></lastBuildDate>
                <generator>http://www.sixapart.com/movabletype/</generator>
                <docs>http://www.rssboard.org/rss-specification</docs>
        <mt:Entries lastn="15">
                <item>
                    <title><$mt:EntryTitle remove_html="1" encode_xml="1"$></title>
                    <description><$mt:EntryBody encode_xml="1"$></description>
                    <link><$mt:EntryPermalink encode_xml="1"$></link>
                    <guid><$mt:EntryPermalink encode_xml="1"$></guid>
            <mt:EntryCategories>
                        <category domain="http://www.sixapart.com/ns/types#category"><$mt:CategoryLabel remove_html="1" encode_xml="1"$></category>
            </mt:EntryCategories>
            <mt:EntryTags>
                        <category domain="http://www.sixapart.com/ns/types#tag"><$mt:TagName remove_html="1" encode_xml="1"$></category>
            </mt:EntryTags>
                    <pubDate><$mt:EntryDate format_name="rfc822"$></pubDate>
                </item>
        </mt:Entries>
            </channel>
        </rss>
    
  2. Save the RSS Feed index template.

  3. Publish the RSS Feed index template.
  4. Add the following to the template containing your html header code. (Should be the "Header" or "HTML head" template module):

    <link rel="alternate" type="application/atom+xml" title="Atom" href="<$mt:Link template="RSS Feed"$>" />
    
  5. Republish blog.

Back

1 Comment

Webmaestro

Webmaestro on March 2, 2010, 10:48 a.m. Reply

Step 4 indicates type="application/atom+xml" but since this is about RSS, shouldn’t it be type="application/rss+xml"?

Leave a Comment