Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Customising RSSFeed date


Go to End


3 Posts   1117 Views

Avatar
AdamJ

Community Member, 145 Posts

8 April 2011 at 11:35pm

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

Avatar
Willr

Forum Moderator, 5523 Posts

10 April 2011 at 4:10pm

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.

Avatar
AdamJ

Community Member, 145 Posts

10 April 2011 at 4:35pm

Excellent! Thanks Willr!

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