There is no automatic way to do this, but you can write your own module that does this.
What you need to do is to add a class that implements Orchard.Core.Feeds.IFeedItemBuilder
interface. The interface itself has only one method you need to implement - void Populate(FeedContext context)
.
Here's the code snippet of how you might implement this method:
public void Populate(FeedContext context)
{
context.Response.Contextualize(
c => {
foreach (var feedItem in context.Response.Items.OfType<FeedItem<ContentItem>>())
{
var contentItem = feedItem.Item;
foreach (var part in contentItem.Parts)
{
// extract data you're interested in from parts
foreach (var field in part.Fields)
{
// extract data you're interested in from fields
feedItem.Element.SetElementValue("description", "Text to output to RSS");
}
}
}
});
}
context.Response.Items
holds all items that will be outputted to RSS. The tricky part here is to know which data you want to output to RSS since there are many different parts with many different fields. And they all have different property names you would like to output to RSS.
Therefore, my suggestion is to test if contentItem
in the example above is of your custom type. If it is, cast it and use your custom field names to fill the description
of that feedItem
.