<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Frontend/news/news_paginated.html.twig */
class __TwigTemplate_78c95d36326ac1707b1b694e21fede9aa2d6288676cb55dd07fcfba937d40b10 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "Frontend/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Frontend/news/news_paginated.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Frontend/news/news_paginated.html.twig"));
$this->parent = $this->loadTemplate("Frontend/layout.html.twig", "Frontend/news/news_paginated.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo " ";
// line 5
echo " <section id=\"news\">
<article>
<div class=\"grid-container\">
<div class=\"tabs-content\" data-tabs-content=\"news-tabs\">
<div class=\"tabs-panel is-active\" id=\"all\">
<aside class=\"listado\">
<header>
<h1>";
// line 12
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Hemeroteca", [], "messages");
echo "</h1>
</header>
<div>";
// line 14
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Frontend\\SearchController::drawForm"));
echo "</div>
<div class=\"grid-x grid-margin-x grid-margin-y\">
";
// line 16
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 16, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["new"]) {
// line 17
echo " ";
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["new"], "id", [], "any", false, false, false, 17), (isset($context["news_for_china_only"]) || array_key_exists("news_for_china_only", $context) ? $context["news_for_china_only"] : (function () { throw new RuntimeError('Variable "news_for_china_only" does not exist.', 17, $this->source); })())))) {
// line 18
echo " ";
if ( !twig_test_empty((isset($context["fromChina"]) || array_key_exists("fromChina", $context) ? $context["fromChina"] : (function () { throw new RuntimeError('Variable "fromChina" does not exist.', 18, $this->source); })()))) {
// line 19
echo " ";
// line 20
echo " <div class=\"cell small-12 medium-6 large-4\">
";
// line 21
if (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getTranslations", [], "method", false, true, false, 21), 0, [], "array", false, true, false, 21), "getTitle", [], "method", true, true, false, 21)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getTranslations", [], "method", false, true, false, 21), 0, [], "array", false, true, false, 21), "getTitle", [], "method", false, false, false, 21))) : (""))) {
// line 22
echo " ";
$context["newsPath"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("new", ["seoSlug" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "translations", [], "any", false, false, false, 22), 0, [], "array", false, false, false, 22), "getTitle", [], "method", false, false, false, 22)), "id" => twig_get_attribute($this->env, $this->source, $context["new"], "getId", [], "method", false, false, false, 22)]);
// line 23
echo " ";
} else {
// line 24
echo " ";
$context["newsPath"] = "";
// line 25
echo " ";
}
// line 26
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, true, false, 26), 0, [], "array", true, true, false, 26)) {
// line 27
echo " ";
$context["imgPath"] = ((((((((isset($context["IMG_PATH"]) || array_key_exists("IMG_PATH", $context) ? $context["IMG_PATH"] : (function () { throw new RuntimeError('Variable "IMG_PATH" does not exist.', 27, $this->source); })()) . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "section", [], "any", false, false, false, 27)) . "/") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "itemId", [], "any", false, false, false, 27)) . "/resized/") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "id", [], "any", false, false, false, 27)) . "_backendGallery.") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "extension", [], "any", false, false, false, 27));
// line 28
echo " ";
} else {
// line 29
echo " ";
$context["imgPath"] = "";
// line 30
echo " ";
}
// line 31
echo " <figure>
<a href=\"";
// line 32
echo twig_escape_filter($this->env, (isset($context["newsPath"]) || array_key_exists("newsPath", $context) ? $context["newsPath"] : (function () { throw new RuntimeError('Variable "newsPath" does not exist.', 32, $this->source); })()), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["new"], "getTitle", [], "method", false, false, false, 32), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, (isset($context["imgPath"]) || array_key_exists("imgPath", $context) ? $context["imgPath"] : (function () { throw new RuntimeError('Variable "imgPath" does not exist.', 32, $this->source); })()), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["new"], "getTitle", [], "method", false, false, false, 32), "html", null, true);
echo "\" /></a>
</figure>
<div>
<h3><a href=\"";
// line 35
echo twig_escape_filter($this->env, (isset($context["newsPath"]) || array_key_exists("newsPath", $context) ? $context["newsPath"] : (function () { throw new RuntimeError('Variable "newsPath" does not exist.', 35, $this->source); })()), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "translations", [], "any", false, false, false, 35), 0, [], "array", false, false, false, 35), "getTitle", [], "method", false, false, false, 35), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "translations", [], "any", false, false, false, 35), 0, [], "array", false, false, false, 35), "getTitle", [], "method", false, false, false, 35), "html", null, true);
echo "</a></h3>
";
// line 36
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["new"], "getCategories", [], "method", false, false, false, 36));
foreach ($context['_seq'] as $context["_key"] => $context["categ"]) {
// line 37
echo " ";
// line 38
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["categ"], "getTranslations", [], "method", false, false, false, 38), 0, [], "array", false, false, false, 38), "getName", [], "method", false, false, false, 38)), "id" => twig_get_attribute($this->env, $this->source, $context["categ"], "getId", [], "method", false, false, false, 38)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["categ"], "translations", [], "any", false, false, false, 38), 0, [], "array", false, false, false, 38), "getName", [], "method", false, false, false, 38), "html", null, true);
echo "</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['categ'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 40
echo " <span>";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["new"], "publicationDate", [], "any", false, false, false, 40), "d/m/Y"), "html", null, true);
echo "</span>
</div>
</div>
";
}
// line 44
echo " ";
} else {
// line 45
echo " <div class=\"cell small-12 medium-6 large-4\">
";
// line 46
if (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getTranslations", [], "method", false, true, false, 46), 0, [], "array", false, true, false, 46), "getTitle", [], "method", true, true, false, 46)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getTranslations", [], "method", false, true, false, 46), 0, [], "array", false, true, false, 46), "getTitle", [], "method", false, false, false, 46))) : (""))) {
// line 47
echo " ";
$context["newsPath"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("new", ["seoSlug" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "translations", [], "any", false, false, false, 47), 0, [], "array", false, false, false, 47), "getTitle", [], "method", false, false, false, 47)), "id" => twig_get_attribute($this->env, $this->source, $context["new"], "getId", [], "method", false, false, false, 47)]);
// line 48
echo " ";
} else {
// line 49
echo " ";
$context["newsPath"] = "";
// line 50
echo " ";
}
// line 51
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, true, false, 51), 0, [], "array", true, true, false, 51)) {
// line 52
echo " ";
$context["imgPath"] = ((((((((isset($context["IMG_PATH"]) || array_key_exists("IMG_PATH", $context) ? $context["IMG_PATH"] : (function () { throw new RuntimeError('Variable "IMG_PATH" does not exist.', 52, $this->source); })()) . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 52), 0, [], "array", false, false, false, 52), "section", [], "any", false, false, false, 52)) . "/") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 52), 0, [], "array", false, false, false, 52), "itemId", [], "any", false, false, false, 52)) . "/resized/") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 52), 0, [], "array", false, false, false, 52), "id", [], "any", false, false, false, 52)) . "_backendGallery.") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "images", [], "any", false, false, false, 52), 0, [], "array", false, false, false, 52), "extension", [], "any", false, false, false, 52));
// line 53
echo " ";
} else {
// line 54
echo " ";
$context["imgPath"] = "";
// line 55
echo " ";
}
// line 56
echo " <figure>
<a href=\"";
// line 57
echo twig_escape_filter($this->env, (isset($context["newsPath"]) || array_key_exists("newsPath", $context) ? $context["newsPath"] : (function () { throw new RuntimeError('Variable "newsPath" does not exist.', 57, $this->source); })()), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["new"], "getTitle", [], "method", false, false, false, 57), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, (isset($context["imgPath"]) || array_key_exists("imgPath", $context) ? $context["imgPath"] : (function () { throw new RuntimeError('Variable "imgPath" does not exist.', 57, $this->source); })()), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["new"], "getTitle", [], "method", false, false, false, 57), "html", null, true);
echo "\" /></a>
</figure>
<div>
<h3><a href=\"";
// line 60
echo twig_escape_filter($this->env, (isset($context["newsPath"]) || array_key_exists("newsPath", $context) ? $context["newsPath"] : (function () { throw new RuntimeError('Variable "newsPath" does not exist.', 60, $this->source); })()), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "translations", [], "any", false, false, false, 60), 0, [], "array", false, false, false, 60), "getTitle", [], "method", false, false, false, 60), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "translations", [], "any", false, false, false, 60), 0, [], "array", false, false, false, 60), "getTitle", [], "method", false, false, false, 60), "html", null, true);
echo "</a></h3>
";
// line 61
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["new"], "getCategories", [], "method", false, false, false, 61));
foreach ($context['_seq'] as $context["_key"] => $context["categ"]) {
// line 62
echo " ";
// line 63
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["categ"], "getTranslations", [], "method", false, false, false, 63), 0, [], "array", false, false, false, 63), "getName", [], "method", false, false, false, 63)), "id" => twig_get_attribute($this->env, $this->source, $context["categ"], "getId", [], "method", false, false, false, 63)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["categ"], "translations", [], "any", false, false, false, 63), 0, [], "array", false, false, false, 63), "getName", [], "method", false, false, false, 63), "html", null, true);
echo "</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['categ'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 65
echo " <span>";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["new"], "publicationDate", [], "any", false, false, false, 65), "d/m/Y"), "html", null, true);
echo "</span>
</div>
</div>
";
}
// line 69
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['new'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 70
echo " </div>
";
// line 71
if ((1 === twig_compare((isset($context["totalPages"]) || array_key_exists("totalPages", $context) ? $context["totalPages"] : (function () { throw new RuntimeError('Variable "totalPages" does not exist.', 71, $this->source); })()), 1))) {
// line 72
echo " ";
$context["extremePagesLimit"] = 1;
echo " ";
// line 73
echo " ";
$context["nearbyPagesLimit"] = 3;
echo " ";
// line 74
echo " <nav aria-label=\"Pagination\">
<ul class=\"pagination\">
<li>
<a href=\"";
// line 77
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsPaginated", ["currentPage" => ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 77, $this->source); })()) - 1)]), "html", null, true);
echo "\" aria-label=\"Previous page\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/icon/arrow-left.svg"), "html", null, true);
echo "\" title=\"";
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Anterior", [], "messages");
echo "\" /></a>
</li>
";
// line 79
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, (isset($context["extremePagesLimit"]) || array_key_exists("extremePagesLimit", $context) ? $context["extremePagesLimit"] : (function () { throw new RuntimeError('Variable "extremePagesLimit" does not exist.', 79, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 80
echo " ";
if ((-1 === twig_compare($context["i"], ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 80, $this->source); })()) - (isset($context["nearbyPagesLimit"]) || array_key_exists("nearbyPagesLimit", $context) ? $context["nearbyPagesLimit"] : (function () { throw new RuntimeError('Variable "nearbyPagesLimit" does not exist.', 80, $this->source); })()))))) {
// line 81
echo " <li>
<a href=\"";
// line 82
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsPaginated", ["currentPage" => $context["i"]]), "html", null, true);
echo "\" aria-label=\"Page ";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "</a>
</li>
";
}
// line 85
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 86
echo " ";
if ((-1 === twig_compare(((isset($context["extremePagesLimit"]) || array_key_exists("extremePagesLimit", $context) ? $context["extremePagesLimit"] : (function () { throw new RuntimeError('Variable "extremePagesLimit" does not exist.', 86, $this->source); })()) + 1), ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 86, $this->source); })()) - (isset($context["nearbyPagesLimit"]) || array_key_exists("nearbyPagesLimit", $context) ? $context["nearbyPagesLimit"] : (function () { throw new RuntimeError('Variable "nearbyPagesLimit" does not exist.', 86, $this->source); })()))))) {
// line 87
echo " <li class=\"ellipsis\" aria-hidden=\"true\"></li>
";
}
// line 89
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 89, $this->source); })()) - (isset($context["nearbyPagesLimit"]) || array_key_exists("nearbyPagesLimit", $context) ? $context["nearbyPagesLimit"] : (function () { throw new RuntimeError('Variable "nearbyPagesLimit" does not exist.', 89, $this->source); })())), ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 89, $this->source); })()) - 1)));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 90
echo " ";
if ((1 === twig_compare($context["i"], 0))) {
// line 91
echo " <li>
<a href=\"";
// line 92
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsPaginated", ["currentPage" => $context["i"]]), "html", null, true);
echo "\" aria-label=\"Page ";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "</a>
</li>
";
}
// line 95
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 96
echo " <li class=\"current\">
<a href=\"";
// line 97
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsPaginated", ["currentPage" => (isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 97, $this->source); })())]), "html", null, true);
echo "\" aria-label=\"Page ";
echo twig_escape_filter($this->env, (isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 97, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, (isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 97, $this->source); })()), "html", null, true);
echo "</a>
</li>
";
// line 99
if ((-1 === twig_compare((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 99, $this->source); })()), (isset($context["totalPages"]) || array_key_exists("totalPages", $context) ? $context["totalPages"] : (function () { throw new RuntimeError('Variable "totalPages" does not exist.', 99, $this->source); })())))) {
// line 100
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 100, $this->source); })()) + 1), ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 100, $this->source); })()) + (isset($context["nearbyPagesLimit"]) || array_key_exists("nearbyPagesLimit", $context) ? $context["nearbyPagesLimit"] : (function () { throw new RuntimeError('Variable "nearbyPagesLimit" does not exist.', 100, $this->source); })()))));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 101
echo " ";
if ((0 >= twig_compare($context["i"], (isset($context["totalPages"]) || array_key_exists("totalPages", $context) ? $context["totalPages"] : (function () { throw new RuntimeError('Variable "totalPages" does not exist.', 101, $this->source); })())))) {
// line 102
echo " <li>
<a href=\"";
// line 103
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsPaginated", ["currentPage" => $context["i"]]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "</a>
</li>
";
}
// line 106
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 107
echo "
";
// line 108
if ((1 === twig_compare(((isset($context["totalPages"]) || array_key_exists("totalPages", $context) ? $context["totalPages"] : (function () { throw new RuntimeError('Variable "totalPages" does not exist.', 108, $this->source); })()) - (isset($context["extremePagesLimit"]) || array_key_exists("extremePagesLimit", $context) ? $context["extremePagesLimit"] : (function () { throw new RuntimeError('Variable "extremePagesLimit" does not exist.', 108, $this->source); })())), ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 108, $this->source); })()) + (isset($context["nearbyPagesLimit"]) || array_key_exists("nearbyPagesLimit", $context) ? $context["nearbyPagesLimit"] : (function () { throw new RuntimeError('Variable "nearbyPagesLimit" does not exist.', 108, $this->source); })()))))) {
// line 109
echo " <li class=\"ellipsis\" aria-hidden=\"true\"></li>
";
}
// line 111
echo "
";
// line 112
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range((((isset($context["totalPages"]) || array_key_exists("totalPages", $context) ? $context["totalPages"] : (function () { throw new RuntimeError('Variable "totalPages" does not exist.', 112, $this->source); })()) - (isset($context["extremePagesLimit"]) || array_key_exists("extremePagesLimit", $context) ? $context["extremePagesLimit"] : (function () { throw new RuntimeError('Variable "extremePagesLimit" does not exist.', 112, $this->source); })())) + 1), (isset($context["totalPages"]) || array_key_exists("totalPages", $context) ? $context["totalPages"] : (function () { throw new RuntimeError('Variable "totalPages" does not exist.', 112, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 113
echo " ";
if ((1 === twig_compare($context["i"], ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 113, $this->source); })()) + (isset($context["nearbyPagesLimit"]) || array_key_exists("nearbyPagesLimit", $context) ? $context["nearbyPagesLimit"] : (function () { throw new RuntimeError('Variable "nearbyPagesLimit" does not exist.', 113, $this->source); })()))))) {
// line 114
echo " <li>
<a href=\"";
// line 115
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsPaginated", ["currentPage" => $context["i"]]), "html", null, true);
echo "\" aria-label=\"Page ";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "</a>
</li>
";
}
// line 118
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 119
echo " <li class=\"pagination-next\">
<a href=\"";
// line 120
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsPaginated", ["currentPage" => (((0 >= twig_compare(((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 120, $this->source); })()) + 1), (isset($context["totalPages"]) || array_key_exists("totalPages", $context) ? $context["totalPages"] : (function () { throw new RuntimeError('Variable "totalPages" does not exist.', 120, $this->source); })())))) ? (((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 120, $this->source); })()) + 1)) : ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 120, $this->source); })())))]), "html", null, true);
echo "\" aria-label=\"Next page\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/icon/arrow.svg"), "html", null, true);
echo "\" title=\"";
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Siguiente", [], "messages");
echo "\" /></a>
</li>
";
}
// line 123
echo " </ul>
</nav>
";
}
// line 126
echo " </aside>
</div>
</div>
</div>
</article>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Frontend/news/news_paginated.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 452 => 126, 447 => 123, 437 => 120, 434 => 119, 428 => 118, 418 => 115, 415 => 114, 412 => 113, 408 => 112, 405 => 111, 401 => 109, 399 => 108, 396 => 107, 390 => 106, 382 => 103, 379 => 102, 376 => 101, 371 => 100, 369 => 99, 360 => 97, 357 => 96, 351 => 95, 341 => 92, 338 => 91, 335 => 90, 330 => 89, 326 => 87, 323 => 86, 317 => 85, 307 => 82, 304 => 81, 301 => 80, 297 => 79, 288 => 77, 283 => 74, 279 => 73, 275 => 72, 273 => 71, 270 => 70, 264 => 69, 256 => 65, 245 => 63, 243 => 62, 239 => 61, 231 => 60, 219 => 57, 216 => 56, 213 => 55, 210 => 54, 207 => 53, 204 => 52, 201 => 51, 198 => 50, 195 => 49, 192 => 48, 189 => 47, 187 => 46, 184 => 45, 181 => 44, 173 => 40, 162 => 38, 160 => 37, 156 => 36, 148 => 35, 136 => 32, 133 => 31, 130 => 30, 127 => 29, 124 => 28, 121 => 27, 118 => 26, 115 => 25, 112 => 24, 109 => 23, 106 => 22, 104 => 21, 101 => 20, 99 => 19, 96 => 18, 93 => 17, 89 => 16, 84 => 14, 79 => 12, 70 => 5, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'Frontend/layout.html.twig' %}
{% block content %}
{# dump(news) #}
<section id=\"news\">
<article>
<div class=\"grid-container\">
<div class=\"tabs-content\" data-tabs-content=\"news-tabs\">
<div class=\"tabs-panel is-active\" id=\"all\">
<aside class=\"listado\">
<header>
<h1>{% trans %}Hemeroteca{% endtrans %}</h1>
</header>
<div>{{ render(controller('App\\\\Controller\\\\Frontend\\\\SearchController::drawForm')) }}</div>
<div class=\"grid-x grid-margin-x grid-margin-y\">
{% for new in news %}
{% if new.id == news_for_china_only %}
{% if fromChina is not empty %}
{# dump(new) #}
<div class=\"cell small-12 medium-6 large-4\">
{% if new.getTranslations()[0].getTitle()|default %}
{% set newsPath = path('new', { seoSlug: new.translations[0].getTitle()|make_url_phrase, id: new.getId() }) %}
{% else %}
{% set newsPath = '' %}
{% endif %}
{% if new.images[0] is defined %}
{% set imgPath = IMG_PATH ~ new.images[0].section ~ '/' ~ new.images[0].itemId ~ '/resized/' ~ new.images[0].id ~ '_backendGallery.' ~ new.images[0].extension %}
{% else %}
{% set imgPath = '' %}
{% endif %}
<figure>
<a href=\"{{ newsPath }}\" title=\"{{ new.getTitle() }}\"><img src=\"{{ imgPath }}\" alt=\"{{ new.getTitle() }}\" /></a>
</figure>
<div>
<h3><a href=\"{{ newsPath }}\" title=\"{{ new.translations[0].getTitle() }}\">{{ new.translations[0].getTitle() }}</a></h3>
{% for categ in new.getCategories() %}
{# dump(categ) #}
<a href=\"{{ path('newsByCateg', { seoSlugCategory: categ.getTranslations()[0].getName()|make_url_phrase, id: categ.getId() }) }}\">{{ categ.translations[0].getName() }}</a>
{% endfor %}
<span>{{ new.publicationDate|date('d/m/Y') }}</span>
</div>
</div>
{% endif %}
{% else %}
<div class=\"cell small-12 medium-6 large-4\">
{% if new.getTranslations()[0].getTitle()|default %}
{% set newsPath = path('new', { seoSlug: new.translations[0].getTitle()|make_url_phrase, id: new.getId() }) %}
{% else %}
{% set newsPath = '' %}
{% endif %}
{% if new.images[0] is defined %}
{% set imgPath = IMG_PATH ~ new.images[0].section ~ '/' ~ new.images[0].itemId ~ '/resized/' ~ new.images[0].id ~ '_backendGallery.' ~ new.images[0].extension %}
{% else %}
{% set imgPath = '' %}
{% endif %}
<figure>
<a href=\"{{ newsPath }}\" title=\"{{ new.getTitle() }}\"><img src=\"{{ imgPath }}\" alt=\"{{ new.getTitle() }}\" /></a>
</figure>
<div>
<h3><a href=\"{{ newsPath }}\" title=\"{{ new.translations[0].getTitle() }}\">{{ new.translations[0].getTitle() }}</a></h3>
{% for categ in new.getCategories() %}
{# dump(categ) #}
<a href=\"{{ path('newsByCateg', { seoSlugCategory: categ.getTranslations()[0].getName()|make_url_phrase, id: categ.getId() }) }}\">{{ categ.translations[0].getName() }}</a>
{% endfor %}
<span>{{ new.publicationDate|date('d/m/Y') }}</span>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% if totalPages > 1 %}
{% set extremePagesLimit = 1 %} {# El nº de primeras y últimas páginas a mostrar #}
{% set nearbyPagesLimit = 3 %} {# El nº de páginas que se muestran desde la página actual #}
<nav aria-label=\"Pagination\">
<ul class=\"pagination\">
<li>
<a href=\"{{ path('newsPaginated', { currentPage: currentPage - 1 }) }}\" aria-label=\"Previous page\"><img src=\"{{ asset('assets/images/icon/arrow-left.svg') }}\" title=\"{% trans %}Anterior{% endtrans %}\" /></a>
</li>
{% for i in 1..extremePagesLimit %}
{% if i < currentPage - nearbyPagesLimit %}
<li>
<a href=\"{{ path('newsPaginated', { currentPage: i }) }}\" aria-label=\"Page {{ i }}\">{{ i }}</a>
</li>
{% endif %}
{% endfor %}
{% if extremePagesLimit + 1 < currentPage - nearbyPagesLimit %}
<li class=\"ellipsis\" aria-hidden=\"true\"></li>
{% endif %}
{% for i in range(currentPage - nearbyPagesLimit, currentPage - 1) %}
{% if i > 0 %}
<li>
<a href=\"{{ path('newsPaginated', { currentPage: i }) }}\" aria-label=\"Page {{ i }}\">{{ i }}</a>
</li>
{% endif %}
{% endfor %}
<li class=\"current\">
<a href=\"{{ path('newsPaginated', { currentPage: currentPage }) }}\" aria-label=\"Page {{ currentPage }}\">{{ currentPage }}</a>
</li>
{% if currentPage < totalPages %}
{% for i in range(currentPage + 1, currentPage + nearbyPagesLimit) %}
{% if i <= totalPages %}
<li>
<a href=\"{{ path('newsPaginated', { currentPage: i }) }}\">{{ i }}</a>
</li>
{% endif %}
{% endfor %}
{% if totalPages - extremePagesLimit > currentPage + nearbyPagesLimit %}
<li class=\"ellipsis\" aria-hidden=\"true\"></li>
{% endif %}
{% for i in range(totalPages - extremePagesLimit + 1, totalPages) %}
{% if i > currentPage + nearbyPagesLimit %}
<li>
<a href=\"{{ path('newsPaginated', { currentPage: i }) }}\" aria-label=\"Page {{ i }}\">{{ i }}</a>
</li>
{% endif %}
{% endfor %}
<li class=\"pagination-next\">
<a href=\"{{ path('newsPaginated', { currentPage: currentPage + 1 <= totalPages ? currentPage + 1 : currentPage }) }}\" aria-label=\"Next page\"><img src=\"{{ asset('assets/images/icon/arrow.svg') }}\" title=\"{% trans %}Siguiente{% endtrans %}\" /></a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</aside>
</div>
</div>
</div>
</article>
</section>
{% endblock %}
", "Frontend/news/news_paginated.html.twig", "/var/www/espanyol/templates/Frontend/news/news_paginated.html.twig");
}
}