Jump to:

23487 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Customising RSSFeed date

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 756 Views
  • AdamJ
    Avatar
    Community Member
    145 Posts

    Customising RSSFeed date Link to this post

    Hey guys,

    I've done some searching but couldn't find anything on this particular topic.

    Is there any way to customise the date used for the RSS feed? From what I can tell it looks like it's using the creation date, I'd like to use a custom date field.

    If I've missed something obvious, let me know

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Customising RSSFeed date Link to this post

    If you take a look at the default RssFeed.ss template it checks for a field called 'Date' then uses Created as a back up. If you want to customize that you should be able to do like any other template in SS and copy that file (from sapphire/templates) to themes/yourtheme/templates/ then alter where it says '<% if Date %><pubDate>$Date.Rfc822</pubDate>' and change to whatever field you want.

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: Customising RSSFeed date Link to this post

    Excellent! Thanks Willr!

    My next question would be, is it possible to set which template it uses per call to the RSS creation script?

    756 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.