<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* Pages\NewsOverviewPage\pagetemplate.html.twig */
class __TwigTemplate_59789b170f5090e67b200ac6a4002008 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Pages\\NewsOverviewPage\\pagetemplate.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Pages\\NewsOverviewPage\\pagetemplate.html.twig"));
// line 1
$context["newsPageNode"] = CoreExtension::getAttribute($this->env, $this->source, 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.', 1, $this->source); })()), "getNodeByInternalName", ["news"], "method", false, false, false, 1), "slug", [], "any", false, false, false, 1);
// line 20
$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", false, false, false, 20);
// line 21
yield "<div class=\"hi-jumbo\">
<h1 class=\"jumbo-title\">News & Événements</h1>
</div>
<section class=\"section\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12\">
<nav aria-label=\"breadcrumb\" role=\"navigation\">
<ol class=\"breadcrumb\">
<li class=\"breadcrumb-item\"><a href=\"";
// line 31
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", false, false, false, 31)]), "html", null, true);
yield "\"><i class=\"icon-home\"></i></a></li>
<li class=\"breadcrumb-item active\" aria-current=\"page\">News & Événements</li>
</ol>
</nav>
</div>
<div class=\"col-sm-8\">
<div class=\"row\">
<div class=\"col\">
";
// line 39
$context["count"] = 0;
// line 40
yield " ";
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", false, false, false, 40) > 0)) {
// line 41
yield " ";
$context['_parent'] = $context;
$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", false, false, false, 41));
foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
// line 42
yield " ";
$context["articlenode"] = $this->extensions['Kunstmaan\NodeBundle\Twig\NodeTwigExtension']->getNodeTranslationFor($context["article"]);
// line 43
yield " <article class=\"article-miniature\">
";
// line 44
if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["article"], "image", [], "any", false, false, false, 44))) {
// line 45
yield " <div class=\"article-img\">
<a href=\"";
// line 46
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", false, false, false, 46), "html", null, true);
yield "\"><img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["article"], "image", [], "any", false, false, false, 46), "url", [], "any", false, false, false, 46)), "html", null, true);
yield "\" ";
if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["article"], "imageAltText", [], "any", false, false, false, 46))) {
yield "alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["article"], "imageAltText", [], "any", false, false, false, 46), "html", null, true);
yield "\"";
}
yield " /></a>
</div>
";
}
// line 49
yield " <div class=\"article-caption\">
<h5 class=\"art-mini-title\"><a href=\"";
// line 50
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", false, false, false, 50), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["article"], "title", [], "any", false, false, false, 50), "html", null, true);
yield "</a></h5>
<p>
";
// line 52
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", false, false, false, 52), 0, 70));
yield "
</p>
";
// line 55
if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["article"], "tags", [], "any", false, false, false, 55))) {
// line 56
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["article"], "tags", [], "any", false, false, false, 56));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 57
yield " <a href=\"";
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", false, false, false, 57), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::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", false, false, false, 57), "locale", [], "any", false, false, false, 57)), "html", null, true);
yield "\" class=\"badge badge-primary\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, false, 57), "html", null, true);
yield "</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['tag'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 59
yield " ";
}
// line 60
yield " <div class=\"text-right\">
<a href=\"";
// line 61
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", false, false, false, 61), "html", null, true);
yield "\">» Lire la suite</a>
</div>
</div>
</article>
";
// line 65
$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);
// line 66
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['article'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 67
yield " ";
}
// line 68
yield " </div>
";
// line 70
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", false, false, false, 70)) {
// line 71
yield " <div class=\"col-12\">
";
// line 72
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>"]);
// line 76
yield "
</div>
";
}
// line 79
yield " </div>
</div>
";
// line 81
yield from $this->loadTemplate("@IUTUDCWebsite/Layout/_aside_right.html.twig", "Pages\\NewsOverviewPage\\pagetemplate.html.twig", 81)->unwrap()->yield($context);
// line 82
yield " </div>
</div>
</section>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "Pages\\NewsOverviewPage\\pagetemplate.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% set newsPageNode = nodemenu.getNodeByInternalName('news').slug %}
{# {% set currentUrl = app.request.attributes.get('_nodeTranslation').url %}
{% set baseRoute = '_slug' ~ (app.request.attributes.get('preview') ? '_preview' : '') %}
{% set basePath = path(baseRoute, { 'url': currentUrl, '_locale': app.request.locale }) %}
{% set tagContext = get_article_tags(app.request, 'IUTUDCWebsiteBundle:NewsTag') %}
<div class=\"container\">
<div class=\"row\">
<div class=\"col-md-12\">
<div class=\"blog-filter js-toggle-container\">
<div class=\"blog-filter__top\">
<div class=\"blog-filter__top__section blog-filter__top__section--filters\">
<strong>{{ 'article_overview_page.filter'|trans }}</strong>
</div>
{% include 'IUTUDCWebsiteBundle:Pages:NewsOverviewPage/_filter-tag.html.twig' with {'tags': tagContext.tags} %} </div>
<div class=\"blog-filter__filters\"> {% include 'IUTUDCWebsiteBundle:Pages:NewsOverviewPage/_list-tag.html.twig' with {'tagContext': tagContext} %} </div> </div>
</div>
</div>
</div>#}
{% set homepagePageNode = nodemenu.getNodeByInternalName('homepage') %}
<div class=\"hi-jumbo\">
<h1 class=\"jumbo-title\">News & Événements</h1>
</div>
<section class=\"section\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12\">
<nav aria-label=\"breadcrumb\" role=\"navigation\">
<ol class=\"breadcrumb\">
<li class=\"breadcrumb-item\"><a href=\"{{ path('_slug', { 'url': homepagePageNode.slug }) }}\"><i class=\"icon-home\"></i></a></li>
<li class=\"breadcrumb-item active\" aria-current=\"page\">News & Événements</li>
</ol>
</nav>
</div>
<div class=\"col-sm-8\">
<div class=\"row\">
<div class=\"col\">
{% set count = 0 %}
{% if pagerfanta.nbResults > 0 %}
{% for article in pagerfanta.currentPageResults %}
{% set articlenode = get_node_translation_for(article) %}
<article class=\"article-miniature\">
{% if article.image is not empty %}
<div class=\"article-img\">
<a href=\"{{ articlenode.url }}\"><img src=\"{{ asset(article.image.url) }}\" {% if article.imageAltText is not empty %}alt=\"{{ article.imageAltText }}\"{% endif %} /></a>
</div>
{% endif %}
<div class=\"article-caption\">
<h5 class=\"art-mini-title\"><a href=\"{{ articlenode.url }}\">{{ article.title }}</a></h5>
<p>
{{ article.summary|slice(0,70)|replace_url|raw }}
</p>
{% if article.tags is not empty %}
{% for tag in article.tags %}
<a href=\"{{ get_article_category_path(newsPageNode, tag.name, app.request.locale) }}\" class=\"badge badge-primary\">{{ tag.name }}</a>
{% endfor %}
{% endif %}
<div class=\"text-right\">
<a href=\"{{ articlenode.url }}\">» Lire la suite</a>
</div>
</div>
</article>
{% set count = count + 1 %}
{% endfor %}
{% endif %}
</div>
{% if pagerfanta.haveToPaginate() %}
<div class=\"col-12\">
{{ pagerfanta(pagerfanta, 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>'
}) }}
</div>
{% endif %}
</div>
</div>
{% include '@IUTUDCWebsite/Layout/_aside_right.html.twig' %}
</div>
</div>
</section>
", "Pages\\NewsOverviewPage\\pagetemplate.html.twig", "/home/u363484990/domains/iut-udc.online/public_html/templates/Pages/NewsOverviewPage/pagetemplate.html.twig");
}
}