From 85e7e8105f10eaaf05a9b732d31cc0bfac6b819e Mon Sep 17 00:00:00 2001 From: tom32i Date: Sun, 18 Oct 2015 17:06:44 +0200 Subject: [PATCH] Fixed RSS feed template --- src/Resources/views/rss.xml.twig | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Resources/views/rss.xml.twig b/src/Resources/views/rss.xml.twig index 8cf3570..b6d1e8e 100644 --- a/src/Resources/views/rss.xml.twig +++ b/src/Resources/views/rss.xml.twig @@ -1,16 +1,17 @@ - + {{ title }} {{ description }} {{ language|default('en') }} {{ link|default(canonical) }} - {% if webmaster|default(null) %} - {{ webmaster }} + + {% if webmaster.email|default(null) and webmaster.name|default(null) %} + {{ webmaster.email }} ({{ webmaster.name }}) {% endif %} {% set pubDate = pubDate|default((items|first).pubDate) %} {% if pubDate %} - {{ pubDate|date('c') }} + {{ pubDate|date(constant('DateTime::RFC2822')) }} {% endif %} {% for item in items %} @@ -21,7 +22,7 @@ {{ item.guid }} {% endif %} {% if item.pubDate|default(null) %} - {{ item.pubDate|date('c') }} + {{ item.pubDate|date(constant('DateTime::RFC2822')) }} {% endif %} {% endfor %}