var/cache/dev/twig/58/58ebfb6d59c49fd03015cccd0c8b9a92981b39345d77b5156f9487fc4b387b9b.php line 48

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Frontend/news/news_by_categ.html.twig */
  14. class __TwigTemplate_99d5ccf48495dc73c7851629e67da4dacef8ca9fc16ef2562b0faa05e2f49ded extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'content' => [$this'block_content'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "Frontend/layout.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Frontend/news/news_by_categ.html.twig"));
  36.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Frontend/news/news_by_categ.html.twig"));
  38.         $this->parent $this->loadTemplate("Frontend/layout.html.twig""Frontend/news/news_by_categ.html.twig"1);
  39.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  40.         
  41.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  42.         
  43.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  44.     }
  45.     // line 3
  46.     public function block_content($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  51.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         // line 4
  54.         echo "  ";
  55.         echo " ";
  56.         // line 5
  57.         echo "  <section id=\"news\">
  58.     <!-- CATEGORY TABS -->
  59.     <article>
  60.       <div class=\"grid-container\">
  61.         <div class=\"tabs-content\" data-tabs-content=\"news-tabs\">
  62.           <div class=\"tabs-panel is-active\" id=\"all\">
  63.             <aside class=\"listado\">
  64.               <header>
  65.                 <h1>";
  66.         // line 13
  67.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'13$this->source); })()), "translations", [], "any"falsefalsefalse13), 0, [], "array"falsefalsefalse13), "getName", [], "method"falsefalsefalse13), "html"nulltrue);
  68.         echo "</h1>
  69.               </header>
  70.               <div class=\"grid-x grid-margin-x grid-margin-y\">
  71.                 ";
  72.         // line 16
  73.         $context['_parent'] = $context;
  74.         $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); })()));
  75.         foreach ($context['_seq'] as $context["_key"] => $context["new"]) {
  76.             // line 17
  77.             echo "                  ";
  78.             if ((=== twig_compare(twig_get_attribute($this->env$this->source$context["new"], "id", [], "any"falsefalsefalse17), (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); })())))) {
  79.                 // line 18
  80.                 echo "                    ";
  81.                 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); })()))) {
  82.                     // line 19
  83.                     echo "                      <div class=\"cell small-12 medium-6 large-4\">
  84.                         ";
  85.                     // line 20
  86.                     if (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsetruefalse20), 0, [], "array"falsetruefalse20), "getTitle", [], "method"truetruefalse20)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsetruefalse20), 0, [], "array"falsetruefalse20), "getTitle", [], "method"falsefalsefalse20))) : (""))) {
  87.                         // line 21
  88.                         echo "                          ";
  89.                         $context["newsPath"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("new", ["seoSlug" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse21), 0, [], "array"falsefalsefalse21), "getTitle", [], "method"falsefalsefalse21)), "id" => twig_get_attribute($this->env$this->source$context["new"], "getId", [], "method"falsefalsefalse21)]);
  90.                         // line 22
  91.                         echo "                        ";
  92.                     } else {
  93.                         // line 23
  94.                         echo "                          ";
  95.                         $context["newsPath"] = "";
  96.                         // line 24
  97.                         echo "                        ";
  98.                     }
  99.                     // line 25
  100.                     echo "                        ";
  101.                     if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsetruefalse25), 0, [], "array"truetruefalse25)) {
  102.                         // line 26
  103.                         echo "                          ";
  104.                         $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.'26$this->source); })()) . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse26), 0, [], "array"falsefalsefalse26), "section", [], "any"falsefalsefalse26)) . "/") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse26), 0, [], "array"falsefalsefalse26), "itemId", [], "any"falsefalsefalse26)) . "/resized/") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse26), 0, [], "array"falsefalsefalse26), "id", [], "any"falsefalsefalse26)) . "_backendGallery.") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse26), 0, [], "array"falsefalsefalse26), "extension", [], "any"falsefalsefalse26));
  105.                         // line 27
  106.                         echo "                        ";
  107.                     } else {
  108.                         // line 28
  109.                         echo "                          ";
  110.                         $context["imgPath"] = "";
  111.                         // line 29
  112.                         echo "                        ";
  113.                     }
  114.                     // line 30
  115.                     echo "                        <figure>
  116.                           <a href=\"";
  117.                     // line 31
  118.                     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.'31$this->source); })()), "html"nulltrue);
  119.                     echo "\" title=\"";
  120.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse31), 0, [], "array"falsefalsefalse31), "getTitle", [], "method"falsefalsefalse31), "html"nulltrue);
  121.                     echo "\"><img src=\"";
  122.                     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.'31$this->source); })()), "html"nulltrue);
  123.                     echo "\" alt=\"";
  124.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse31), 0, [], "array"falsefalsefalse31), "getTitle", [], "method"falsefalsefalse31), "html"nulltrue);
  125.                     echo "\" /></a>
  126.                         </figure>
  127.                         <div>
  128.                           <h3><a href=\"";
  129.                     // line 34
  130.                     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.'34$this->source); })()), "html"nulltrue);
  131.                     echo "\" title=\"";
  132.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse34), 0, [], "array"falsefalsefalse34), "getTitle", [], "method"falsefalsefalse34), "html"nulltrue);
  133.                     echo "\">";
  134.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse34), 0, [], "array"falsefalsefalse34), "getTitle", [], "method"falsefalsefalse34), "html"nulltrue);
  135.                     echo "</a></h3>
  136.                           ";
  137.                     // line 35
  138.                     $context['_parent'] = $context;
  139.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["new"], "getCategories", [], "method"falsefalsefalse35));
  140.                     foreach ($context['_seq'] as $context["_key"] => $context["categ"]) {
  141.                         // line 36
  142.                         echo "                            ";
  143.                         // line 37
  144.                         echo "                            <a href=\"";
  145.                         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->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["categ"], "getTranslations", [], "method"falsefalsefalse37), 0, [], "array"falsefalsefalse37), "getName", [], "method"falsefalsefalse37)), "id" => twig_get_attribute($this->env$this->source$context["categ"], "getId", [], "method"falsefalsefalse37)]), "html"nulltrue);
  146.                         echo "\">";
  147.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["categ"], "getTranslations", [], "any"falsefalsefalse37), 0, [], "array"falsefalsefalse37), "getName", [], "method"falsefalsefalse37), "html"nulltrue);
  148.                         echo "</a>
  149.                           ";
  150.                     }
  151.                     $_parent $context['_parent'];
  152.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['categ'], $context['_parent'], $context['loop']);
  153.                     $context array_intersect_key($context$_parent) + $_parent;
  154.                     // line 39
  155.                     echo "                          <span>";
  156.                     echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["new"], "publicationDate", [], "any"falsefalsefalse39), "d/m/Y"), "html"nulltrue);
  157.                     echo "</span>
  158.                         </div>
  159.                       </div>
  160.                     ";
  161.                 }
  162.                 // line 43
  163.                 echo "                  ";
  164.             } else {
  165.                 // line 44
  166.                 echo "                    <div class=\"cell small-12 medium-6 large-4\">
  167.                       ";
  168.                 // line 45
  169.                 if (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsetruefalse45), 0, [], "array"falsetruefalse45), "getTitle", [], "method"truetruefalse45)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsetruefalse45), 0, [], "array"falsetruefalse45), "getTitle", [], "method"falsefalsefalse45))) : (""))) {
  170.                     // line 46
  171.                     echo "                        ";
  172.                     $context["newsPath"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("new", ["seoSlug" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse46), 0, [], "array"falsefalsefalse46), "getTitle", [], "method"falsefalsefalse46)), "id" => twig_get_attribute($this->env$this->source$context["new"], "getId", [], "method"falsefalsefalse46)]);
  173.                     // line 47
  174.                     echo "                      ";
  175.                 } else {
  176.                     // line 48
  177.                     echo "                        ";
  178.                     $context["newsPath"] = "";
  179.                     // line 49
  180.                     echo "                      ";
  181.                 }
  182.                 // line 50
  183.                 echo "                      ";
  184.                 if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsetruefalse50), 0, [], "array"truetruefalse50)) {
  185.                     // line 51
  186.                     echo "                        ";
  187.                     $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.'51$this->source); })()) . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse51), 0, [], "array"falsefalsefalse51), "section", [], "any"falsefalsefalse51)) . "/") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse51), 0, [], "array"falsefalsefalse51), "itemId", [], "any"falsefalsefalse51)) . "/resized/") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse51), 0, [], "array"falsefalsefalse51), "id", [], "any"falsefalsefalse51)) . "_backendGallery.") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "images", [], "any"falsefalsefalse51), 0, [], "array"falsefalsefalse51), "extension", [], "any"falsefalsefalse51));
  188.                     // line 52
  189.                     echo "                      ";
  190.                 } else {
  191.                     // line 53
  192.                     echo "                        ";
  193.                     $context["imgPath"] = "";
  194.                     // line 54
  195.                     echo "                      ";
  196.                 }
  197.                 // line 55
  198.                 echo "                      <figure>
  199.                         <a href=\"";
  200.                 // line 56
  201.                 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.'56$this->source); })()), "html"nulltrue);
  202.                 echo "\" title=\"";
  203.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse56), 0, [], "array"falsefalsefalse56), "getTitle", [], "method"falsefalsefalse56), "html"nulltrue);
  204.                 echo "\"><img src=\"";
  205.                 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.'56$this->source); })()), "html"nulltrue);
  206.                 echo "\" alt=\"";
  207.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse56), 0, [], "array"falsefalsefalse56), "getTitle", [], "method"falsefalsefalse56), "html"nulltrue);
  208.                 echo "\" /></a>
  209.                       </figure>
  210.                       <div>
  211.                         <h3><a href=\"";
  212.                 // line 59
  213.                 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.'59$this->source); })()), "html"nulltrue);
  214.                 echo "\" title=\"";
  215.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse59), 0, [], "array"falsefalsefalse59), "getTitle", [], "method"falsefalsefalse59), "html"nulltrue);
  216.                 echo "\">";
  217.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["new"], "getTranslations", [], "method"falsefalsefalse59), 0, [], "array"falsefalsefalse59), "getTitle", [], "method"falsefalsefalse59), "html"nulltrue);
  218.                 echo "</a></h3>
  219.                         ";
  220.                 // line 60
  221.                 $context['_parent'] = $context;
  222.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["new"], "getCategories", [], "method"falsefalsefalse60));
  223.                 foreach ($context['_seq'] as $context["_key"] => $context["categ"]) {
  224.                     // line 61
  225.                     echo "                          ";
  226.                     // line 62
  227.                     echo "                          <a href=\"";
  228.                     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->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["categ"], "getTranslations", [], "method"falsefalsefalse62), 0, [], "array"falsefalsefalse62), "getName", [], "method"falsefalsefalse62)), "id" => twig_get_attribute($this->env$this->source$context["categ"], "getId", [], "method"falsefalsefalse62)]), "html"nulltrue);
  229.                     echo "\">";
  230.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["categ"], "getTranslations", [], "any"falsefalsefalse62), 0, [], "array"falsefalsefalse62), "getName", [], "method"falsefalsefalse62), "html"nulltrue);
  231.                     echo "</a>
  232.                         ";
  233.                 }
  234.                 $_parent $context['_parent'];
  235.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['categ'], $context['_parent'], $context['loop']);
  236.                 $context array_intersect_key($context$_parent) + $_parent;
  237.                 // line 64
  238.                 echo "                        <span>";
  239.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["new"], "publicationDate", [], "any"falsefalsefalse64), "d/m/Y"), "html"nulltrue);
  240.                 echo "</span>
  241.                       </div>
  242.                     </div>
  243.                   ";
  244.             }
  245.             // line 68
  246.             echo "                ";
  247.         }
  248.         $_parent $context['_parent'];
  249.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['new'], $context['_parent'], $context['loop']);
  250.         $context array_intersect_key($context$_parent) + $_parent;
  251.         // line 69
  252.         echo "              </div>
  253.             </aside>
  254.             ";
  255.         // line 71
  256.         if ((=== 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))) {
  257.             // line 72
  258.             echo "              ";
  259.             $context["extremePagesLimit"] = 1;
  260.             echo " ";
  261.             // line 73
  262.             echo "              ";
  263.             $context["nearbyPagesLimit"] = 3;
  264.             echo " ";
  265.             // line 74
  266.             echo "              <nav aria-label=\"Pagination\">
  267.                 <ul class=\"pagination\">
  268.                   <li>
  269.                     <a href=\"";
  270.             // line 77
  271.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["id" => twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'77$this->source); })()), "getId", [], "method"falsefalsefalse77), "seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'77$this->source); })()), "getTranslations", [], "method"falsefalsefalse77), 0, [], "array"falsefalsefalse77), "getName", [], "method"falsefalsefalse77)), "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"nulltrue);
  272.             echo "\" aria-label=\"Previous page\"><img src=\"";
  273.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/icon/arrow-left.svg"), "html"nulltrue);
  274.             echo "\" title=\"";
  275.             echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Anterior", [], "messages");
  276.             echo "\" /></a>
  277.                   </li>
  278.                   ";
  279.             // line 79
  280.             $context['_parent'] = $context;
  281.             $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); })())));
  282.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  283.                 // line 80
  284.                 echo "                    ";
  285.                 if ((-=== 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); })()))))) {
  286.                     // line 81
  287.                     echo "                      <li>
  288.                         <a href=\"";
  289.                     // line 82
  290.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["id" => twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'82$this->source); })()), "getId", [], "method"falsefalsefalse82), "seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'82$this->source); })()), "getTranslations", [], "method"falsefalsefalse82), 0, [], "array"falsefalsefalse82), "getName", [], "method"falsefalsefalse82)), "currentPage" => $context["i"]]), "html"nulltrue);
  291.                     echo "\" aria-label=\"Page ";
  292.                     echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  293.                     echo "\">";
  294.                     echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  295.                     echo "</a>
  296.                       </li>
  297.                     ";
  298.                 }
  299.                 // line 85
  300.                 echo "                  ";
  301.             }
  302.             $_parent $context['_parent'];
  303.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  304.             $context array_intersect_key($context$_parent) + $_parent;
  305.             // line 86
  306.             echo "                  ";
  307.             if ((-=== 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); })()))))) {
  308.                 // line 87
  309.                 echo "                    <li class=\"ellipsis\" aria-hidden=\"true\"></li>
  310.                   ";
  311.             }
  312.             // line 89
  313.             echo "                  ";
  314.             $context['_parent'] = $context;
  315.             $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)));
  316.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  317.                 // line 90
  318.                 echo "                    ";
  319.                 if ((=== twig_compare($context["i"], 0))) {
  320.                     // line 91
  321.                     echo "                      <li>
  322.                         <a href=\"";
  323.                     // line 92
  324.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["id" => twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'92$this->source); })()), "getId", [], "method"falsefalsefalse92), "seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'92$this->source); })()), "getTranslations", [], "method"falsefalsefalse92), 0, [], "array"falsefalsefalse92), "getName", [], "method"falsefalsefalse92)), "currentPage" => $context["i"]]), "html"nulltrue);
  325.                     echo "\" aria-label=\"Page ";
  326.                     echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  327.                     echo "\">";
  328.                     echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  329.                     echo "</a>
  330.                       </li>
  331.                     ";
  332.                 }
  333.                 // line 95
  334.                 echo "                  ";
  335.             }
  336.             $_parent $context['_parent'];
  337.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  338.             $context array_intersect_key($context$_parent) + $_parent;
  339.             // line 96
  340.             echo "                  <li class=\"current\">
  341.                     <a href=\"";
  342.             // line 97
  343.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["id" => twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'97$this->source); })()), "getId", [], "method"falsefalsefalse97), "seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'97$this->source); })()), "getTranslations", [], "method"falsefalsefalse97), 0, [], "array"falsefalsefalse97), "getName", [], "method"falsefalsefalse97)), "currentPage" => (isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'97$this->source); })())]), "html"nulltrue);
  344.             echo "\" aria-label=\"Page ";
  345.             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"nulltrue);
  346.             echo "\">";
  347.             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"nulltrue);
  348.             echo "</a>
  349.                   </li>
  350.                   ";
  351.             // line 99
  352.             if ((-=== 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); })())))) {
  353.                 // line 100
  354.                 echo "                    ";
  355.                 $context['_parent'] = $context;
  356.                 $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); })()))));
  357.                 foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  358.                     // line 101
  359.                     echo "                      ";
  360.                     if ((>= 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); })())))) {
  361.                         // line 102
  362.                         echo "                        <li>
  363.                           <a href=\"";
  364.                         // line 103
  365.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["id" => twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'103$this->source); })()), "getId", [], "method"falsefalsefalse103), "seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'103$this->source); })()), "getTranslations", [], "method"falsefalsefalse103), 0, [], "array"falsefalsefalse103), "getName", [], "method"falsefalsefalse103)), "currentPage" => $context["i"]]), "html"nulltrue);
  366.                         echo "\">";
  367.                         echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  368.                         echo "</a>
  369.                         </li>
  370.                       ";
  371.                     }
  372.                     // line 106
  373.                     echo "                    ";
  374.                 }
  375.                 $_parent $context['_parent'];
  376.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  377.                 $context array_intersect_key($context$_parent) + $_parent;
  378.                 // line 107
  379.                 echo "
  380.                     ";
  381.                 // line 108
  382.                 if ((=== 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); })()))))) {
  383.                     // line 109
  384.                     echo "                      <li class=\"ellipsis\" aria-hidden=\"true\"></li>
  385.                     ";
  386.                 }
  387.                 // line 111
  388.                 echo "
  389.                     ";
  390.                 // line 112
  391.                 $context['_parent'] = $context;
  392.                 $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); })())));
  393.                 foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  394.                     // line 113
  395.                     echo "                      ";
  396.                     if ((=== 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); })()))))) {
  397.                         // line 114
  398.                         echo "                        <li>
  399.                           <a href=\"";
  400.                         // line 115
  401.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["id" => twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'115$this->source); })()), "getId", [], "method"falsefalsefalse115), "seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'115$this->source); })()), "getTranslations", [], "method"falsefalsefalse115), 0, [], "array"falsefalsefalse115), "getName", [], "method"falsefalsefalse115)), "currentPage" => $context["i"]]), "html"nulltrue);
  402.                         echo "\" aria-label=\"Page ";
  403.                         echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  404.                         echo "\">";
  405.                         echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  406.                         echo "</a>
  407.                         </li>
  408.                       ";
  409.                     }
  410.                     // line 118
  411.                     echo "                    ";
  412.                 }
  413.                 $_parent $context['_parent'];
  414.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  415.                 $context array_intersect_key($context$_parent) + $_parent;
  416.                 // line 119
  417.                 echo "                    <li class=\"pagination-next\">
  418.                       <a href=\"";
  419.                 // line 120
  420.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsByCateg", ["id" => twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'120$this->source); })()), "getId", [], "method"falsefalsefalse120), "seoSlugCategory" => $this->extensions['App\Twig\AppExtension']->makeUrlPhrase(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'120$this->source); })()), "getTranslations", [], "method"falsefalsefalse120), 0, [], "array"falsefalsefalse120), "getName", [], "method"falsefalsefalse120)), "currentPage" => (((>= 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"nulltrue);
  421.                 echo "\" aria-label=\"Next page\"><img src=\"";
  422.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/icon/arrow.svg"), "html"nulltrue);
  423.                 echo "\" title=\"";
  424.                 echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Siguiente", [], "messages");
  425.                 echo "\" /></a>
  426.                     </li>
  427.                   ";
  428.             }
  429.             // line 123
  430.             echo "                </ul>
  431.               </nav>
  432.             ";
  433.         }
  434.         // line 126
  435.         echo "          </div>
  436.         </div>
  437.       </div>
  438.     </article>
  439.   </section>
  440. ";
  441.         
  442.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  443.         
  444.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  445.     }
  446.     public function getTemplateName()
  447.     {
  448.         return "Frontend/news/news_by_categ.html.twig";
  449.     }
  450.     public function isTraitable()
  451.     {
  452.         return false;
  453.     }
  454.     public function getDebugInfo()
  455.     {
  456.         return array (  449 => 126,  444 => 123,  434 => 120,  431 => 119,  425 => 118,  415 => 115,  412 => 114,  409 => 113,  405 => 112,  402 => 111,  398 => 109,  396 => 108,  393 => 107,  387 => 106,  379 => 103,  376 => 102,  373 => 101,  368 => 100,  366 => 99,  357 => 97,  354 => 96,  348 => 95,  338 => 92,  335 => 91,  332 => 90,  327 => 89,  323 => 87,  320 => 86,  314 => 85,  304 => 82,  301 => 81,  298 => 80,  294 => 79,  285 => 77,  280 => 74,  276 => 73,  272 => 72,  270 => 71,  266 => 69,  260 => 68,  252 => 64,  241 => 62,  239 => 61,  235 => 60,  227 => 59,  215 => 56,  212 => 55,  209 => 54,  206 => 53,  203 => 52,  200 => 51,  197 => 50,  194 => 49,  191 => 48,  188 => 47,  185 => 46,  183 => 45,  180 => 44,  177 => 43,  169 => 39,  158 => 37,  156 => 36,  152 => 35,  144 => 34,  132 => 31,  129 => 30,  126 => 29,  123 => 28,  120 => 27,  117 => 26,  114 => 25,  111 => 24,  108 => 23,  105 => 22,  102 => 21,  100 => 20,  97 => 19,  94 => 18,  91 => 17,  87 => 16,  81 => 13,  71 => 5,  68 => 4,  58 => 3,  35 => 1,);
  457.     }
  458.     public function getSourceContext()
  459.     {
  460.         return new Source("{% extends 'Frontend/layout.html.twig' %}
  461. {% block content %}
  462.   {# dump(category) #} {# dump(news) #}
  463.   <section id=\"news\">
  464.     <!-- CATEGORY TABS -->
  465.     <article>
  466.       <div class=\"grid-container\">
  467.         <div class=\"tabs-content\" data-tabs-content=\"news-tabs\">
  468.           <div class=\"tabs-panel is-active\" id=\"all\">
  469.             <aside class=\"listado\">
  470.               <header>
  471.                 <h1>{{ category.translations[0].getName() }}</h1>
  472.               </header>
  473.               <div class=\"grid-x grid-margin-x grid-margin-y\">
  474.                 {% for new in news %}
  475.                   {% if new.id == news_for_china_only %}
  476.                     {% if fromChina is not empty %}
  477.                       <div class=\"cell small-12 medium-6 large-4\">
  478.                         {% if new.getTranslations()[0].getTitle()|default %}
  479.                           {% set newsPath = path('new', { seoSlug: new.getTranslations()[0].getTitle()|make_url_phrase, id: new.getId() }) %}
  480.                         {% else %}
  481.                           {% set newsPath = '' %}
  482.                         {% endif %}
  483.                         {% if new.images[0] is defined %}
  484.                           {% set imgPath = IMG_PATH ~ new.images[0].section ~ '/' ~ new.images[0].itemId ~ '/resized/' ~ new.images[0].id ~ '_backendGallery.' ~ new.images[0].extension %}
  485.                         {% else %}
  486.                           {% set imgPath = '' %}
  487.                         {% endif %}
  488.                         <figure>
  489.                           <a href=\"{{ newsPath }}\" title=\"{{ new.getTranslations()[0].getTitle() }}\"><img src=\"{{ imgPath }}\" alt=\"{{ new.getTranslations()[0].getTitle() }}\" /></a>
  490.                         </figure>
  491.                         <div>
  492.                           <h3><a href=\"{{ newsPath }}\" title=\"{{ new.getTranslations()[0].getTitle() }}\">{{ new.getTranslations()[0].getTitle() }}</a></h3>
  493.                           {% for categ in new.getCategories() %}
  494.                             {# dump(categ) #}
  495.                             <a href=\"{{ path('newsByCateg', { seoSlugCategory: categ.getTranslations()[0].getName()|make_url_phrase, id: categ.getId() }) }}\">{{ categ.getTranslations[0].getName() }}</a>
  496.                           {% endfor %}
  497.                           <span>{{ new.publicationDate|date('d/m/Y') }}</span>
  498.                         </div>
  499.                       </div>
  500.                     {% endif %}
  501.                   {% else %}
  502.                     <div class=\"cell small-12 medium-6 large-4\">
  503.                       {% if new.getTranslations()[0].getTitle()|default %}
  504.                         {% set newsPath = path('new', { seoSlug: new.getTranslations()[0].getTitle()|make_url_phrase, id: new.getId() }) %}
  505.                       {% else %}
  506.                         {% set newsPath = '' %}
  507.                       {% endif %}
  508.                       {% if new.images[0] is defined %}
  509.                         {% set imgPath = IMG_PATH ~ new.images[0].section ~ '/' ~ new.images[0].itemId ~ '/resized/' ~ new.images[0].id ~ '_backendGallery.' ~ new.images[0].extension %}
  510.                       {% else %}
  511.                         {% set imgPath = '' %}
  512.                       {% endif %}
  513.                       <figure>
  514.                         <a href=\"{{ newsPath }}\" title=\"{{ new.getTranslations()[0].getTitle() }}\"><img src=\"{{ imgPath }}\" alt=\"{{ new.getTranslations()[0].getTitle() }}\" /></a>
  515.                       </figure>
  516.                       <div>
  517.                         <h3><a href=\"{{ newsPath }}\" title=\"{{ new.getTranslations()[0].getTitle() }}\">{{ new.getTranslations()[0].getTitle() }}</a></h3>
  518.                         {% for categ in new.getCategories() %}
  519.                           {# dump(categ) #}
  520.                           <a href=\"{{ path('newsByCateg', { seoSlugCategory: categ.getTranslations()[0].getName()|make_url_phrase, id: categ.getId() }) }}\">{{ categ.getTranslations[0].getName() }}</a>
  521.                         {% endfor %}
  522.                         <span>{{ new.publicationDate|date('d/m/Y') }}</span>
  523.                       </div>
  524.                     </div>
  525.                   {% endif %}
  526.                 {% endfor %}
  527.               </div>
  528.             </aside>
  529.             {% if totalPages > 1 %}
  530.               {% set extremePagesLimit = 1 %} {# El nº de primeras y últimas páginas a mostrar #}
  531.               {% set nearbyPagesLimit = 3 %} {# El nº de páginas que se muestran desde la página actual #}
  532.               <nav aria-label=\"Pagination\">
  533.                 <ul class=\"pagination\">
  534.                   <li>
  535.                     <a href=\"{{ path('newsByCateg', { id: category.getId(), seoSlugCategory: category.getTranslations()[0].getName()|make_url_phrase, currentPage: currentPage - 1 }) }}\" aria-label=\"Previous page\"><img src=\"{{ asset('assets/images/icon/arrow-left.svg') }}\" title=\"{% trans %}Anterior{% endtrans %}\" /></a>
  536.                   </li>
  537.                   {% for i in 1..extremePagesLimit %}
  538.                     {% if i < currentPage - nearbyPagesLimit %}
  539.                       <li>
  540.                         <a href=\"{{ path('newsByCateg', { id: category.getId(), seoSlugCategory: category.getTranslations()[0].getName()|make_url_phrase, currentPage: i }) }}\" aria-label=\"Page {{ i }}\">{{ i }}</a>
  541.                       </li>
  542.                     {% endif %}
  543.                   {% endfor %}
  544.                   {% if extremePagesLimit + 1 < currentPage - nearbyPagesLimit %}
  545.                     <li class=\"ellipsis\" aria-hidden=\"true\"></li>
  546.                   {% endif %}
  547.                   {% for i in range(currentPage - nearbyPagesLimit, currentPage - 1) %}
  548.                     {% if i > 0 %}
  549.                       <li>
  550.                         <a href=\"{{ path('newsByCateg', { id: category.getId(), seoSlugCategory: category.getTranslations()[0].getName()|make_url_phrase, currentPage: i }) }}\" aria-label=\"Page {{ i }}\">{{ i }}</a>
  551.                       </li>
  552.                     {% endif %}
  553.                   {% endfor %}
  554.                   <li class=\"current\">
  555.                     <a href=\"{{ path('newsByCateg', { id: category.getId(), seoSlugCategory: category.getTranslations()[0].getName()|make_url_phrase, currentPage: currentPage }) }}\" aria-label=\"Page {{ currentPage }}\">{{ currentPage }}</a>
  556.                   </li>
  557.                   {% if currentPage < totalPages %}
  558.                     {% for i in range(currentPage + 1, currentPage + nearbyPagesLimit) %}
  559.                       {% if i <= totalPages %}
  560.                         <li>
  561.                           <a href=\"{{ path('newsByCateg', { id: category.getId(), seoSlugCategory: category.getTranslations()[0].getName()|make_url_phrase, currentPage: i }) }}\">{{ i }}</a>
  562.                         </li>
  563.                       {% endif %}
  564.                     {% endfor %}
  565.                     {% if totalPages - extremePagesLimit > currentPage + nearbyPagesLimit %}
  566.                       <li class=\"ellipsis\" aria-hidden=\"true\"></li>
  567.                     {% endif %}
  568.                     {% for i in range(totalPages - extremePagesLimit + 1, totalPages) %}
  569.                       {% if i > currentPage + nearbyPagesLimit %}
  570.                         <li>
  571.                           <a href=\"{{ path('newsByCateg', { id: category.getId(), seoSlugCategory: category.getTranslations()[0].getName()|make_url_phrase, currentPage: i }) }}\" aria-label=\"Page {{ i }}\">{{ i }}</a>
  572.                         </li>
  573.                       {% endif %}
  574.                     {% endfor %}
  575.                     <li class=\"pagination-next\">
  576.                       <a href=\"{{ path('newsByCateg', { id: category.getId(), seoSlugCategory: category.getTranslations()[0].getName()|make_url_phrase, currentPage: currentPage + 1 <= totalPages ? currentPage + 1 : currentPage }) }}\" aria-label=\"Next page\"><img src=\"{{ asset('assets/images/icon/arrow.svg') }}\" title=\"{% trans %}Siguiente{% endtrans %}\" /></a>
  577.                     </li>
  578.                   {% endif %}
  579.                 </ul>
  580.               </nav>
  581.             {% endif %}
  582.           </div>
  583.         </div>
  584.       </div>
  585.     </article>
  586.   </section>
  587. {% endblock %}
  588. ""Frontend/news/news_by_categ.html.twig""/var/www/espanyol/templates/Frontend/news/news_by_categ.html.twig");
  589.     }
  590. }