Hi Super,
what you need to do is create your own control which inherits the MonoX control in question (for Let's Socialize that's usually
Events.ascx) and you need to implement the
IRssWebPart interface.
First you need to implement the
GetRssChannel() method to return a
RssChannel and register the page with rss engine
:
Easiest way to do this is setting the underlying RssChannel property on the init event with something like this:
RssEngine.RssEngine.RegisterProviderModule(this.Page, this);
Then setup the Rss channel:
if (RssChannel == null)
{
RssChannel = new RssChannel();
RssChannel.Link = Request.RawUrl;
RssChannel.Items = new System.Collections.Generic.List<
RssChannelItem
>();
}
Now when the RSS channel is created you need to add some items to it. This is usually best done when binding the entities to the control (
ItemDataBound event of the repeating control, in case of
Events.ascx that's a
ListView control).
In the
OnItemDataBound event create create a new
RssChanneltem and assign it's properties to what you want to have in the feed (Title, Description, Link etc.) and add it to the previously created
RssChannel.
RssChannelItem rssItem =
new
RssChannelItem();
// here set the properties of rssItem to what you need in the feed, then add to the RssChannel
RssChannel.Items.Add(rssItem);
One more thing you need to do is set the
RssEnabled property to
true.
Let me know if this helps.
Regards,