-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PubDate in RSS feed is wrong #394
Comments
Would you mind opening a PR? |
Not so fast. I could transfer my RSSFeed.ss changes to the main RSSFeed.ss, but that's in silverstripe-framework, and not the blog module. Is modifying RSSFeed.ss in the core really the correct solution for a blog problem? |
You can add a template to another module and it should override the framework one |
I think we'll need a separate template for this. If we overwrite the existing template in Blog then it will affect all RSS feeds which isn't what we want. If you can create/copy the RSS template from framework to a custom template (ie. BlogRssFeed.ss) in blog, but with the date updated to |
What about adding a getDate() method that returns PublishDate? RSSFeed.ss will use Date if it exists. |
Either of those suggestions are good. |
Please PR anyone. :) |
See #403 |
FIX #394 add getDate to proxy publish date in rss template
The date that ends up in the RSS feed is the post's creation date, and not its publish date. I've worked around this by creating a custom RSSFeed.ss template that replaces:
<% if $Date %>$Date.Rfc822
<% else %>$Created.Rfc822<% end_if %>
with the following:
<% if $PublishDate %>$PublishDate.Rfc822
<% else_if $Date %>$Date.Rfc822
<% else %>$Created.Rfc822<% end_if %>
This works, but it would be better if it worked correctly out of the box.
The text was updated successfully, but these errors were encountered: