var/cache/dev/twig/01/0113dd1f0fb86f93a907464b2b9a57d0.php line 223

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* blog/list.html.twig */
  16. class __TwigTemplate_ee76d602c80a9ca243468fe9659341c3 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'title' => [$this'block_title'],
  29.             'bodyClass' => [$this'block_bodyClass'],
  30.             'content' => [$this'block_content'],
  31.         ];
  32.     }
  33.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34.     {
  35.         // line 1
  36.         return "default/layout.html.twig";
  37.     }
  38.     protected function doDisplay(array $context, array $blocks = []): iterable
  39.     {
  40.         $macros $this->macros;
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blog/list.html.twig"));
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blog/list.html.twig"));
  45.         $this->parent $this->load("default/layout.html.twig"1);
  46.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 3
  53.     /**
  54.      * @return iterable<null|scalar|\Stringable>
  55.      */
  56.     public function block_title(array $context, array $blocks = []): iterable
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  63.         yield "Noticias";
  64.         
  65.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  66.         
  67.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  68.         yield from [];
  69.     }
  70.     // line 5
  71.     /**
  72.      * @return iterable<null|scalar|\Stringable>
  73.      */
  74.     public function block_bodyClass(array $context, array $blocks = []): iterable
  75.     {
  76.         $macros $this->macros;
  77.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  78.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClass"));
  79.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClass"));
  81.         yield " blog-page ";
  82.         
  83.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  84.         
  85.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  86.         yield from [];
  87.     }
  88.     // line 7
  89.     /**
  90.      * @return iterable<null|scalar|\Stringable>
  91.      */
  92.     public function block_content(array $context, array $blocks = []): iterable
  93.     {
  94.         $macros $this->macros;
  95.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  96.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  97.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  98.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  99.         // line 8
  100.         yield "
  101. <div class=\"row white inner-main-wrapper\">
  102.   <div class=\"medium-9 columns\">
  103.     ";
  104.         // line 12
  105.         yield from $this->load("default/breadcrumbs.html.twig"12)->unwrap()->yield(CoreExtension::merge($context, ["breadcrumbs" => [["url" => "#""title" => "Noticias"]]]));
  106.         // line 17
  107.         yield "
  108.     <h1 class=\"page-title\">Noticias</h1>
  109.     <div class=\"post-list\">
  110.       ";
  111.         // line 20
  112.         $context['_parent'] = $context;
  113.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["posts"]) || array_key_exists("posts"$context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.'20$this->source); })()));
  114.         foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
  115.             // line 21
  116.             yield "      <article class=\"teaser post\">
  117.         <div class=\"row\">
  118.           <div class=\"medium-3 columns\">
  119.             ";
  120.             // line 25
  121.             if ((($tmp CoreExtension::getAttribute($this->env$this->source$context["post"], "image", [], "any"falsefalsefalse25)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  122.                 // line 26
  123.                 yield "              <div class=\"image\"><img src=\"";
  124.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("/uploads/images/" CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["post"], "image", [], "any"falsefalsefalse26), "path", [], "any"falsefalsefalse26))), "html"nulltrue);
  125.                 yield "\" alt=\"";
  126.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse26), "html"nulltrue);
  127.                 yield "\" loading=\"lazy\"></div>
  128.             ";
  129.             }
  130.             // line 28
  131.             yield "
  132.             ";
  133.             // line 29
  134.             if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->source$context["post"], "tags", [], "any"falsefalsefalse29)) > 0)) {
  135.                 // line 30
  136.                 yield "              <div class=\"tags\">
  137.                 ";
  138.                 // line 31
  139.                 $context['_parent'] = $context;
  140.                 $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source$context["post"], "tags", [], "any"falsefalsefalse31));
  141.                 foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
  142.                     // line 32
  143.                     yield "                  <a href=\"";
  144.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_tag", ["name" => CoreExtension::getAttribute($this->env$this->source$context["tag"], "name", [], "any"falsefalsefalse32), "id" => CoreExtension::getAttribute($this->env$this->source$context["tag"], "id", [], "any"falsefalsefalse32)]), "html"nulltrue);
  145.                     yield "\" class=\"tag\">";
  146.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["tag"], "name", [], "any"falsefalsefalse32), "html"nulltrue);
  147.                     yield "</a>
  148.                 ";
  149.                 }
  150.                 $_parent $context['_parent'];
  151.                 unset($context['_seq'], $context['_key'], $context['tag'], $context['_parent']);
  152.                 $context array_intersect_key($context$_parent) + $_parent;
  153.                 // line 34
  154.                 yield "              </div>
  155.             ";
  156.             }
  157.             // line 36
  158.             yield "
  159.           </div>
  160.           <div class=\"medium-9 columns\">
  161.             <h3 class=\"title\">";
  162.             // line 39
  163.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse39), "html"nulltrue);
  164.             yield "</h3>
  165.             <div class=\"created\">";
  166.             // line 40
  167.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["post"], "created", [], "any"falsefalsefalse40), "d M Y"), "html"nulltrue);
  168.             yield "</div>
  169.             <div class=\"summary\">";
  170.             // line 41
  171.             yield Twig\Extension\CoreExtension::striptags($this->extensions['Uniski\ResourceBundle\Twig\LegacyTwigExtension']->truncateFilter(CoreExtension::getAttribute($this->env$this->source$context["post"], "body", [], "any"falsefalsefalse41), 300true));
  172.             yield "</div>
  173.             <a href=\"";
  174.             // line 42
  175.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("show_post", ["slug" => CoreExtension::getAttribute($this->env$this->source$context["post"], "slug", [], "any"falsefalsefalse42)]), "html"nulltrue);
  176.             yield "\" class=\"more-link\">Leer más</a>
  177.           </div>
  178.         </div>
  179.       </article>
  180.     ";
  181.         }
  182.         $_parent $context['_parent'];
  183.         unset($context['_seq'], $context['_key'], $context['post'], $context['_parent']);
  184.         $context array_intersect_key($context$_parent) + $_parent;
  185.         // line 47
  186.         yield "    </div>
  187.     <div class=\"navigation\">
  188.         ";
  189.         // line 49
  190.         yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["posts"]) || array_key_exists("posts"$context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.'49$this->source); })()));
  191.         yield "
  192.     </div>
  193.   </div>
  194.   <div class=\"medium-3 columns\">
  195.     ";
  196.         // line 53
  197.         yield from $this->load("blog/sidebar.html.twig"53)->unwrap()->yield($context);
  198.         // line 54
  199.         yield "  </div>
  200. </div>
  201. ";
  202.         
  203.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  204.         
  205.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  206.         yield from [];
  207.     }
  208.     /**
  209.      * @codeCoverageIgnore
  210.      */
  211.     public function getTemplateName(): string
  212.     {
  213.         return "blog/list.html.twig";
  214.     }
  215.     /**
  216.      * @codeCoverageIgnore
  217.      */
  218.     public function isTraitable(): bool
  219.     {
  220.         return false;
  221.     }
  222.     /**
  223.      * @codeCoverageIgnore
  224.      */
  225.     public function getDebugInfo(): array
  226.     {
  227.         return array (  225 => 54,  223 => 53,  216 => 49,  212 => 47,  201 => 42,  197 => 41,  193 => 40,  189 => 39,  184 => 36,  180 => 34,  169 => 32,  165 => 31,  162 => 30,  160 => 29,  157 => 28,  149 => 26,  147 => 25,  141 => 21,  137 => 20,  132 => 17,  130 => 12,  124 => 8,  111 => 7,  88 => 5,  65 => 3,  42 => 1,);
  228.     }
  229.     public function getSourceContext(): Source
  230.     {
  231.         return new Source("{% extends 'default/layout.html.twig' %}
  232. {% block title %}Noticias{% endblock %}
  233. {% block bodyClass %} blog-page {% endblock %}
  234. {% block content %}
  235. <div class=\"row white inner-main-wrapper\">
  236.   <div class=\"medium-9 columns\">
  237.     {% include 'default/breadcrumbs.html.twig' with
  238.         {breadcrumbs: [
  239.           {url: '#' , title: 'Noticias'}
  240.         ]}
  241.     %}
  242.     <h1 class=\"page-title\">Noticias</h1>
  243.     <div class=\"post-list\">
  244.       {% for post in posts %}
  245.       <article class=\"teaser post\">
  246.         <div class=\"row\">
  247.           <div class=\"medium-3 columns\">
  248.             {% if post.image %}
  249.               <div class=\"image\"><img src=\"{{ asset('/uploads/images/' ~ post.image.path) }}\" alt=\"{{ post.title }}\" loading=\"lazy\"></div>
  250.             {% endif %}
  251.             {% if post.tags | length > 0 %}
  252.               <div class=\"tags\">
  253.                 {% for tag in post.tags %}
  254.                   <a href=\"{{path('blog_tag',{name: tag.name, id: tag.id})}}\" class=\"tag\">{{ tag.name }}</a>
  255.                 {% endfor %}
  256.               </div>
  257.             {% endif %}
  258.           </div>
  259.           <div class=\"medium-9 columns\">
  260.             <h3 class=\"title\">{{ post.title }}</h3>
  261.             <div class=\"created\">{{ post.created | date('d M Y') }}</div>
  262.             <div class=\"summary\">{{ post.body | truncate(300, true) | striptags | raw }}</div>
  263.             <a href=\"{{ path('show_post', {slug: post.slug }) }}\" class=\"more-link\">Leer más</a>
  264.           </div>
  265.         </div>
  266.       </article>
  267.     {% endfor %}
  268.     </div>
  269.     <div class=\"navigation\">
  270.         {{ knp_pagination_render(posts) }}
  271.     </div>
  272.   </div>
  273.   <div class=\"medium-3 columns\">
  274.     {% include 'blog/sidebar.html.twig' %}
  275.   </div>
  276. </div>
  277. {% endblock %}
  278. ""blog/list.html.twig""/var/www/uniski/templates/blog/list.html.twig");
  279.     }
  280. }