More in this section

Forums / Developing with Sitefinity / Dynamic RSS Feed for categories

Dynamic RSS Feed for categories

2 posts, 0 answered
  1. Bruno Michels
    Bruno Michels avatar
    125 posts
    16 Apr 2010
    11 Nov 2010
    Link to this post
    Is there a way to generate a dynamic RSS Feed passing a parameter "category" on the fly?

    I could only find an option to configure it on the admin. I would have to create one for each category and every time a new category is added I would have to add a new feed?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    11 Nov 2010
    Link to this post
    Hi Bruno,

    You can create a custom RssChannelProvider that inherits from Telerik.Cms.Engine.RssChannelProvider or one of the built-in providers like Telerik.Blogs.Rss.RssChannelProvider and override  CreateDataSource() method where you can use GetContent method of ContentManager class and filter the list by all categories you have.

    Basically rss works as follows - you add a category, then the provider is initialized and settings are created in RssViewControl. There is a method SaveSettings() in RssSettignsControl which persist the data and
    sets RssChannelProvider.KeyFilterExpr to the selected value of categories.

    The actual filtering should be performed under the class that inherits from RssChanelProvider. You should pass the settings in Initialize and then override CreateDataSource and filter the data.

    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered