One feature that doesn't work "right out of the box" in Movable Type is dynamic RSS feeds. The reasons for this appear to be related to the implementation of the Smarty rendering engine in the dynamic publishing systems. Certain files required to enable dynamic RSS publishing aren't part of the Movable Type installation. This example will show how to create a dynamic RSS feed for authors, though the logic can be used for anything - categories, dates, comments, etc.
- Note: You will need the PHP plugins for Smarty and Textile under dynamic publishing to use this technique. Place the files contained in the zip file into the /php/plugins directory under your Movable Type installation directory, i.e., the location of your MT.CGI file.
Paste the default RSS 2.0 Index template into the editing screen and make the following two changes:
- Change the first instance of MTEntries from: <MTEntries lastn="1"> to <MTEntries author="`$smarty.request.author`" lastn="1">
Change the second instance of MTEntries from: <MTEntries lastn="15"> to <MTEntries author="`$smarty.request.author`" lastn="1">
http://tech.wizbangblog.com/author/author.xml?author=Kevin%20Aylward
You can call the file directly from your template with code like this:
<a href="<$MTBlogURL$>index.xml?author=<$MTEntryAuthor$>"><$MTEntryAuthor$> RSS Feed</a>
The page should produce RSS 2.0 valid output containing only the entries written by the author passed on the command line. If you do not pass an author variable on the command line all authors are output. Note that sometimes a rebuild of the MTVIEW.PHP file is required before the feed is first published is required.
Given that not passing a variable will output all entries, it's possible to create a single dynamic RSS template that will handle your custom needs as well as your general needs. How you call the feed will determine the content.
A full copy of the completed template can be downloaded here: dynamic_rss.txt








