<?php
/* blog/index.xml.twig */
class __TwigTemplate_db182cd86eb862eb4326ac1cb8ac5e1eff1ece6948935796e9170f78dc67cdbc extends Twig_Template
{
private $source;
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "blog/index.xml.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "blog/index.xml.twig"));
// line 1
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<rss version=\"2.0\">
<channel>
<title>";
// line 4
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("rss.title"), "html", null, true);
echo "</title>
<description>";
// line 5
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("rss.description"), "html", null, true);
echo "</description>
<pubDate>";
// line 6
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, "now", "r", "GMT"), "html", null, true);
echo "</pubDate>
<lastBuildDate>";
// line 7
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, ((twig_get_attribute($this->env, $this->source, twig_last($this->env, (isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new Twig_Error_Runtime('Variable "posts" does not exist.', 7, $this->source); })())), "publishedAt", [], "any", true, true)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, twig_last($this->env, (isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new Twig_Error_Runtime('Variable "posts" does not exist.', 7, $this->source); })())), "publishedAt", []), "now")) : ("now")), "r", "GMT"), "html", null, true);
echo "</lastBuildDate>
<link>";
// line 8
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("blog_index");
echo "</link>
<language>";
// line 9
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new Twig_Error_Runtime('Variable "app" does not exist.', 9, $this->source); })()), "request", []), "locale", []), "html", null, true);
echo "</language>
";
// line 11
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new Twig_Error_Runtime('Variable "posts" does not exist.', 11, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 12
echo " <item>
<title>";
// line 13
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "title", []), "html", null, true);
echo "</title>
<description>";
// line 14
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "summary", []), "html", null, true);
echo "</description>
<link>";
// line 15
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("blog_post", ["slug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [])]), "html", null, true);
echo "</link>
<guid>";
// line 16
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("blog_post", ["slug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [])]), "html", null, true);
echo "</guid>
<pubDate>";
// line 17
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "publishedAt", []), "r", "GMT"), "html", null, true);
echo "</pubDate>
<author>";
// line 18
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "author", []), "email", []), "html", null, true);
echo "</author>
";
// line 19
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["post"], "tags", []));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 20
echo " <category>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["tag"], "name", []), "html", null, true);
echo "</category>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
echo " </item>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 24
echo " </channel>
</rss>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "blog/index.xml.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 110 => 24, 103 => 22, 94 => 20, 90 => 19, 86 => 18, 82 => 17, 78 => 16, 74 => 15, 70 => 14, 66 => 13, 63 => 12, 59 => 11, 54 => 9, 50 => 8, 46 => 7, 42 => 6, 38 => 5, 34 => 4, 29 => 1,);
}
public function getSourceContext()
{
return new Twig_Source("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<rss version=\"2.0\">
<channel>
<title>{{ 'rss.title'|trans }}</title>
<description>{{ 'rss.description'|trans }}</description>
<pubDate>{{ 'now'|date('r', timezone='GMT') }}</pubDate>
<lastBuildDate>{{ (posts|last).publishedAt|default('now')|date('r', timezone='GMT') }}</lastBuildDate>
<link>{{ url('blog_index') }}</link>
<language>{{ app.request.locale }}</language>
{% for post in posts %}
<item>
<title>{{ post.title }}</title>
<description>{{ post.summary }}</description>
<link>{{ url('blog_post', {'slug': post.slug}) }}</link>
<guid>{{ url('blog_post', {'slug': post.slug}) }}</guid>
<pubDate>{{ post.publishedAt|date(format='r', timezone='GMT') }}</pubDate>
<author>{{ post.author.email }}</author>
{% for tag in post.tags %}
<category>{{ tag.name }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>
", "blog/index.xml.twig", "/var/www/html/templates/blog/index.xml.twig");
}
}