-1

Using Sitecore 9, I've set up the OOTB RSS feed. It seems to list items in the order the they appear in Sitecore. My issue is that I have too many items for the RSS feed to list all of them (I set MaximumItemsInFeed to 1000 but the feed appears to max out at 200).

I want to make sure that new items get returned by the RSS feed, which would happen if the Feed was sorted by the the date field that it's using for Publication Date.

How can I set the sort order for the RSS feed?

EDIT: This appears to be an issue with the Date field I used for Publication Date. I changed the configuration to use __Updated, and it displays in chronological order. The only difference between the fields is that my Date of Publication field is Date instead of a Datetime, but I tried changing it to a Datetime and it still isn't working chronologically.

0

You probably want to use GetItemDate which gets the date of syndicated item. The date is used as publication date in the feed, and also for sorting and filtering purposes.

 protected override DateTime? GetItemDate(Item item)
    {
        var baseDate = base.GetItemDate(item);

        var id = item["Article Id"];
        if (string.IsNullOrEmpty(id))
        {
            return baseDate;
        }

        try
        {
            var articleItem = _articleRepository.GetArticleByID(id);
            return articleItem.PublishedDate;
        }
        catch (Exception ex)
        {
            Sitecore.Diagnostics.Log.Error("Error in BlogFeed", ex, this);
        }

        return baseDate;
    }

Check this sample how to override the PublicFeed class which generates your syndicated items. https://doc.sitecore.com/developers/100/sitecore-experience-manager/en/example--syndicate-children-of-multiple-items.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.