We are rolling up content from multiple site collections and are looking for a way to allow a RSS feed from that rolled up content. Any ideas on implementation of a RSS option for a custom webpart? I know the Content Query Web Part has an option to subscribe to it via RSS and am looking to implement that on a custom web part.
2 Answers
I think you'll need an application page (_layouts page) for this that returns the xml needed for the feed. If you've seperated the data/business logic from your presentation layer in your webpart, then this application page should be pretty easy to write because you are just creating a new XML based presentation layer.
As @Steve mentioned, create an Application Page in the _Layouts folder that outputs the RSS feed. Then link to that page from your web part. Here is an example of how to generate an RSS feed from C#: http://www.dailycoding.com/Posts/create_rss_feed_programatically_from_data_in_c.aspx
-
Thanks for the additional information and post. I was hoping to keep the logic for querying the data in just the web part. I hadn't thought of using an application page, but I guess I could create a generic one that takes parameters from the web part. Sep 16, 2011 at 15:47