March 2008 Archives

I'll confess that I haven't found much use for an OPML feed yet for a blog, but some geeks might insist that if it can be done, then it should be done.

The following template is an example of how to create an OPML feed for your Movable Type 4.1 blog that traverses through the categories and subcategories, listing the entries within each:

<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<opml version="1.1">
<head>
  <title><$MTBlogName remove_html="1" encode_xml="1"$></title>
<MTEntries lastn="1">
  <ownerName><$MTEntryAuthorDisplayName encode_xml="1"$></ownerName>
  <MTIfNonEmpty tag="MTEntryAuthorEmail">
<ownerEmail><$MTEntryAuthorEmail encode_xml="1"$></ownerEmail>
</MTIfNonEmpty> <dateModified><$MTEntryModifiedDate format_name="rfc822"$></dateModified> </MTEntries></head> <body> <MTTopLevelCategories> <MTIfNonZero tag="MTCategoryCount"> <outline text="<$MTCategoryLabel remove_html="1" encode_xml="1"$>"
 type="link" url="<$MTCategoryArchiveLink encode_xml="1"$>"
 created="<$MTDate format_name="rfc822"$>"> <MTEntries>
<outline text="<$MTEntryTitle remove_html="1" encode_xml="1"$>"
 type="link" url="<$MTEntryPermalink encode_xml="1"$>"
 created="<$MTEntryDate format_name="rfc822"$>" /> </MTEntries></MTIfNonZero><MTSubcatsRecurse></outline> </MTTopLevelCategories></body> </opml>

Name the feed file something sensible, say, "index.opml" and select to have it published automatically.

To also enable autodiscovery of the feed, add the following line to the Header template, between the <head> and </head> tags:

<link rel="subscriptions" type="text/x-opml" title="<$MTBlogName encode_html="1"$>"
 ref="<$MTBlogURL$>index.opml" />

I have no idea how it will render in any OPML reader, because I haven't been able to locate one. However, the feed appears to validate correctly.

Comments (0)

  • Currently 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 0/5 (0 votes cast)

If you liked this post, share it with others:
  • Digg it!
  • Add to Del.Icio.Us
  • Add to Technorati
  • Stumble It!
  • NewsVine
  • Slashdot
  • Google Bookmarks
  • YahooMyWeb
  • Live
  • Facebook
  • Facebook
  • Add this post to Ma.gnolia
  • Add this post to Reddit
  • Thoof it

Sign In

About This Archive

This page is an archive of entries from March 2008 listed from newest to oldest.

Previous archive: February 2008.

Next archive: June 2008.

Find recent content on the main index or look in the archives to find all content.

Subscribe to Blog

Blogroll

Friends
Sound Opinions
Vacation
Creative Commons License
This weblog is licensed under a Creative Commons License.