var/cache/dev/twig/fc/fcd4d55b3bc46d7df4436153633164c0.php line 134

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. /* Pages\NewsOverviewPage\pagetemplate.html.twig */
  16. class __TwigTemplate_59789b170f5090e67b200ac6a4002008 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->parent false;
  28.         $this->blocks = [
  29.         ];
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = []): iterable
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Pages\\NewsOverviewPage\\pagetemplate.html.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Pages\\NewsOverviewPage\\pagetemplate.html.twig"));
  38.         // line 1
  39.         $context["newsPageNode"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["nodemenu"]) || array_key_exists("nodemenu"$context) ? $context["nodemenu"] : (function () { throw new RuntimeError('Variable "nodemenu" does not exist.'1$this->source); })()), "getNodeByInternalName", ["news"], "method"falsefalsefalse1), "slug", [], "any"falsefalsefalse1);
  40.         // line 20
  41.         $context["homepagePageNode"] = CoreExtension::getAttribute($this->env$this->source, (isset($context["nodemenu"]) || array_key_exists("nodemenu"$context) ? $context["nodemenu"] : (function () { throw new RuntimeError('Variable "nodemenu" does not exist.'20$this->source); })()), "getNodeByInternalName", ["homepage"], "method"falsefalsefalse20);
  42.         // line 21
  43.         yield "<div class=\"hi-jumbo\">
  44.     <h1 class=\"jumbo-title\">News &amp; Événements</h1>
  45. </div>
  46. <section class=\"section\">
  47.     <div class=\"container\">
  48.         <div class=\"row\">
  49.             <div class=\"col-12\">
  50.                 <nav aria-label=\"breadcrumb\" role=\"navigation\">
  51.                     <ol class=\"breadcrumb\">
  52.                         <li class=\"breadcrumb-item\"><a href=\"";
  53.         // line 31
  54.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("_slug", ["url" => CoreExtension::getAttribute($this->env$this->source, (isset($context["homepagePageNode"]) || array_key_exists("homepagePageNode"$context) ? $context["homepagePageNode"] : (function () { throw new RuntimeError('Variable "homepagePageNode" does not exist.'31$this->source); })()), "slug", [], "any"falsefalsefalse31)]), "html"nulltrue);
  55.         yield "\"><i class=\"icon-home\"></i></a></li>
  56.                         <li class=\"breadcrumb-item active\" aria-current=\"page\">News &amp; Événements</li>
  57.                     </ol>
  58.                 </nav>
  59.             </div>
  60.             <div class=\"col-sm-8\">
  61.                 <div class=\"row\">
  62.                     <div class=\"col\">
  63.                         ";
  64.         // line 39
  65.         $context["count"] = 0;
  66.         // line 40
  67.         yield "                        ";
  68.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["pagerfanta"]) || array_key_exists("pagerfanta"$context) ? $context["pagerfanta"] : (function () { throw new RuntimeError('Variable "pagerfanta" does not exist.'40$this->source); })()), "nbResults", [], "any"falsefalsefalse40) > 0)) {
  69.             // line 41
  70.             yield "                            ";
  71.             $context['_parent'] = $context;
  72.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["pagerfanta"]) || array_key_exists("pagerfanta"$context) ? $context["pagerfanta"] : (function () { throw new RuntimeError('Variable "pagerfanta" does not exist.'41$this->source); })()), "currentPageResults", [], "any"falsefalsefalse41));
  73.             foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
  74.                 // line 42
  75.                 yield "                                ";
  76.                 $context["articlenode"] = $this->extensions['Kunstmaan\NodeBundle\Twig\NodeTwigExtension']->getNodeTranslationFor($context["article"]);
  77.                 // line 43
  78.                 yield "                                    <article class=\"article-miniature\">
  79.                                         ";
  80.                 // line 44
  81.                 if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["article"], "image", [], "any"falsefalsefalse44))) {
  82.                     // line 45
  83.                     yield "                                            <div class=\"article-img\">
  84.                                                 <a href=\"";
  85.                     // line 46
  86.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["articlenode"]) || array_key_exists("articlenode"$context) ? $context["articlenode"] : (function () { throw new RuntimeError('Variable "articlenode" does not exist.'46$this->source); })()), "url", [], "any"falsefalsefalse46), "html"nulltrue);
  87.                     yield "\"><img src=\"";
  88.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["article"], "image", [], "any"falsefalsefalse46), "url", [], "any"falsefalsefalse46)), "html"nulltrue);
  89.                     yield "\" ";
  90.                     if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["article"], "imageAltText", [], "any"falsefalsefalse46))) {
  91.                         yield "alt=\"";
  92.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["article"], "imageAltText", [], "any"falsefalsefalse46), "html"nulltrue);
  93.                         yield "\"";
  94.                     }
  95.                     yield " /></a>
  96.                                             </div>
  97.                                         ";
  98.                 }
  99.                 // line 49
  100.                 yield "                                        <div class=\"article-caption\">
  101.                                             <h5 class=\"art-mini-title\"><a href=\"";
  102.                 // line 50
  103.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["articlenode"]) || array_key_exists("articlenode"$context) ? $context["articlenode"] : (function () { throw new RuntimeError('Variable "articlenode" does not exist.'50$this->source); })()), "url", [], "any"falsefalsefalse50), "html"nulltrue);
  104.                 yield "\">";
  105.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["article"], "title", [], "any"falsefalsefalse50), "html"nulltrue);
  106.                 yield "</a></h5>
  107.                                             <p>
  108.                                                 ";
  109.                 // line 52
  110.                 yield $this->extensions['Kunstmaan\NodeBundle\Twig\UrlReplaceTwigExtension']->replaceUrl(Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->source$context["article"], "summary", [], "any"falsefalsefalse52), 070));
  111.                 yield "
  112.                                             </p>
  113.                                             
  114.                                             ";
  115.                 // line 55
  116.                 if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["article"], "tags", [], "any"falsefalsefalse55))) {
  117.                     // line 56
  118.                     yield "                                                ";
  119.                     $context['_parent'] = $context;
  120.                     $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source$context["article"], "tags", [], "any"falsefalsefalse56));
  121.                     foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
  122.                         // line 57
  123.                         yield "                                                    <a href=\"";
  124.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Kunstmaan\ArticleBundle\Twig\ArticleTwigExtension']->getArticleCategoryRouterPath((isset($context["newsPageNode"]) || array_key_exists("newsPageNode"$context) ? $context["newsPageNode"] : (function () { throw new RuntimeError('Variable "newsPageNode" does not exist.'57$this->source); })()), CoreExtension::getAttribute($this->env$this->source$context["tag"], "name", [], "any"falsefalsefalse57), CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'57$this->source); })()), "request", [], "any"falsefalsefalse57), "locale", [], "any"falsefalsefalse57)), "html"nulltrue);
  125.                         yield "\" class=\"badge badge-primary\">";
  126.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["tag"], "name", [], "any"falsefalsefalse57), "html"nulltrue);
  127.                         yield "</a>
  128.                                                 ";
  129.                     }
  130.                     $_parent $context['_parent'];
  131.                     unset($context['_seq'], $context['_key'], $context['tag'], $context['_parent']);
  132.                     $context array_intersect_key($context$_parent) + $_parent;
  133.                     // line 59
  134.                     yield "                                            ";
  135.                 }
  136.                 // line 60
  137.                 yield "                                            <div class=\"text-right\">
  138.                                                 <a href=\"";
  139.                 // line 61
  140.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["articlenode"]) || array_key_exists("articlenode"$context) ? $context["articlenode"] : (function () { throw new RuntimeError('Variable "articlenode" does not exist.'61$this->source); })()), "url", [], "any"falsefalsefalse61), "html"nulltrue);
  141.                 yield "\">» Lire la suite</a>
  142.                                             </div>
  143.                                         </div>
  144.                                     </article>
  145.                                 ";
  146.                 // line 65
  147.                 $context["count"] = ((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'65$this->source); })()) + 1);
  148.                 // line 66
  149.                 yield "                            ";
  150.             }
  151.             $_parent $context['_parent'];
  152.             unset($context['_seq'], $context['_key'], $context['article'], $context['_parent']);
  153.             $context array_intersect_key($context$_parent) + $_parent;
  154.             // line 67
  155.             yield "                        ";
  156.         }
  157.         // line 68
  158.         yield "                    </div>
  159.                     ";
  160.         // line 70
  161.         if (CoreExtension::getAttribute($this->env$this->source, (isset($context["pagerfanta"]) || array_key_exists("pagerfanta"$context) ? $context["pagerfanta"] : (function () { throw new RuntimeError('Variable "pagerfanta" does not exist.'70$this->source); })()), "haveToPaginate", [], "method"falsefalsefalse70)) {
  162.             // line 71
  163.             yield "                        <div class=\"col-12\">
  164.                             ";
  165.             // line 72
  166.             yield $this->env->getRuntime('Pagerfanta\Twig\Extension\PagerfantaRuntime')->renderPagerfanta((isset($context["pagerfanta"]) || array_key_exists("pagerfanta"$context) ? $context["pagerfanta"] : (function () { throw new RuntimeError('Variable "pagerfanta" does not exist.'72$this->source); })()), null, ["pageParameter" => "[page]""prev_message" => "<span class=\"icon--arrow-left pagination__direction-icon\"></span>""next_message" => "<span class=\"icon--arrow-right pagination__direction-icon\"></span>"]);
  167.             // line 76
  168.             yield "
  169.                         </div>
  170.                     ";
  171.         }
  172.         // line 79
  173.         yield "                </div>
  174.             </div>
  175.             ";
  176.         // line 81
  177.         yield from $this->loadTemplate("@IUTUDCWebsite/Layout/_aside_right.html.twig""Pages\\NewsOverviewPage\\pagetemplate.html.twig"81)->unwrap()->yield($context);
  178.         // line 82
  179.         yield "        </div>
  180.     </div>
  181. </section>
  182. ";
  183.         
  184.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  185.         
  186.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  187.         yield from [];
  188.     }
  189.     /**
  190.      * @codeCoverageIgnore
  191.      */
  192.     public function getTemplateName(): string
  193.     {
  194.         return "Pages\\NewsOverviewPage\\pagetemplate.html.twig";
  195.     }
  196.     /**
  197.      * @codeCoverageIgnore
  198.      */
  199.     public function isTraitable(): bool
  200.     {
  201.         return false;
  202.     }
  203.     /**
  204.      * @codeCoverageIgnore
  205.      */
  206.     public function getDebugInfo(): array
  207.     {
  208.         return array (  190 => 82,  188 => 81,  184 => 79,  179 => 76,  177 => 72,  174 => 71,  172 => 70,  168 => 68,  165 => 67,  159 => 66,  157 => 65,  150 => 61,  147 => 60,  144 => 59,  133 => 57,  128 => 56,  126 => 55,  120 => 52,  113 => 50,  110 => 49,  96 => 46,  93 => 45,  91 => 44,  88 => 43,  85 => 42,  80 => 41,  77 => 40,  75 => 39,  64 => 31,  52 => 21,  50 => 20,  48 => 1,);
  209.     }
  210.     public function getSourceContext(): Source
  211.     {
  212.         return new Source("{% set newsPageNode = nodemenu.getNodeByInternalName('news').slug %}
  213. {# {% set currentUrl = app.request.attributes.get('_nodeTranslation').url %}
  214. {% set baseRoute = '_slug' ~ (app.request.attributes.get('preview') ? '_preview' : '') %}
  215. {% set basePath = path(baseRoute, { 'url': currentUrl, '_locale': app.request.locale }) %}
  216. {% set tagContext = get_article_tags(app.request, 'IUTUDCWebsiteBundle:NewsTag') %}
  217. <div class=\"container\">
  218.     <div class=\"row\">
  219.         <div class=\"col-md-12\">
  220.             <div class=\"blog-filter js-toggle-container\">
  221.                 <div class=\"blog-filter__top\">
  222.                     <div class=\"blog-filter__top__section blog-filter__top__section--filters\">
  223.                         <strong>{{ 'article_overview_page.filter'|trans }}</strong>
  224.                     </div>
  225.                     {% include 'IUTUDCWebsiteBundle:Pages:NewsOverviewPage/_filter-tag.html.twig' with {'tags': tagContext.tags} %}                                    </div>
  226.                 <div class=\"blog-filter__filters\">                    {% include 'IUTUDCWebsiteBundle:Pages:NewsOverviewPage/_list-tag.html.twig' with {'tagContext': tagContext} %}                                    </div>            </div>
  227.         </div>
  228.     </div>
  229. </div>#}
  230. {%  set homepagePageNode = nodemenu.getNodeByInternalName('homepage') %}
  231. <div class=\"hi-jumbo\">
  232.     <h1 class=\"jumbo-title\">News &amp; Événements</h1>
  233. </div>
  234. <section class=\"section\">
  235.     <div class=\"container\">
  236.         <div class=\"row\">
  237.             <div class=\"col-12\">
  238.                 <nav aria-label=\"breadcrumb\" role=\"navigation\">
  239.                     <ol class=\"breadcrumb\">
  240.                         <li class=\"breadcrumb-item\"><a href=\"{{ path('_slug', { 'url': homepagePageNode.slug }) }}\"><i class=\"icon-home\"></i></a></li>
  241.                         <li class=\"breadcrumb-item active\" aria-current=\"page\">News &amp; Événements</li>
  242.                     </ol>
  243.                 </nav>
  244.             </div>
  245.             <div class=\"col-sm-8\">
  246.                 <div class=\"row\">
  247.                     <div class=\"col\">
  248.                         {% set count = 0 %}
  249.                         {% if pagerfanta.nbResults > 0 %}
  250.                             {% for article in pagerfanta.currentPageResults %}
  251.                                 {% set articlenode = get_node_translation_for(article) %}
  252.                                     <article class=\"article-miniature\">
  253.                                         {% if article.image is not empty %}
  254.                                             <div class=\"article-img\">
  255.                                                 <a href=\"{{ articlenode.url }}\"><img src=\"{{ asset(article.image.url) }}\" {% if article.imageAltText is not empty %}alt=\"{{ article.imageAltText }}\"{% endif %} /></a>
  256.                                             </div>
  257.                                         {% endif %}
  258.                                         <div class=\"article-caption\">
  259.                                             <h5 class=\"art-mini-title\"><a href=\"{{ articlenode.url }}\">{{ article.title }}</a></h5>
  260.                                             <p>
  261.                                                 {{ article.summary|slice(0,70)|replace_url|raw }}
  262.                                             </p>
  263.                                             
  264.                                             {% if article.tags is not empty %}
  265.                                                 {% for tag in article.tags %}
  266.                                                     <a href=\"{{ get_article_category_path(newsPageNode, tag.name, app.request.locale) }}\" class=\"badge badge-primary\">{{ tag.name }}</a>
  267.                                                 {% endfor %}
  268.                                             {% endif %}
  269.                                             <div class=\"text-right\">
  270.                                                 <a href=\"{{ articlenode.url }}\">» Lire la suite</a>
  271.                                             </div>
  272.                                         </div>
  273.                                     </article>
  274.                                 {% set count = count + 1 %}
  275.                             {% endfor %}
  276.                         {% endif %}
  277.                     </div>
  278.                     {% if pagerfanta.haveToPaginate() %}
  279.                         <div class=\"col-12\">
  280.                             {{ pagerfanta(pagerfanta, null, {
  281.                                 'pageParameter': '[page]',
  282.                                 'prev_message':'<span class=\"icon--arrow-left pagination__direction-icon\"></span>',
  283.                                 'next_message':'<span class=\"icon--arrow-right pagination__direction-icon\"></span>'
  284.                             }) }}
  285.                         </div>
  286.                     {% endif %}
  287.                 </div>
  288.             </div>
  289.             {% include '@IUTUDCWebsite/Layout/_aside_right.html.twig' %}
  290.         </div>
  291.     </div>
  292. </section>
  293. ""Pages\\NewsOverviewPage\\pagetemplate.html.twig""/home/u363484990/domains/iut-udc.online/public_html/templates/Pages/NewsOverviewPage/pagetemplate.html.twig");
  294.     }
  295. }