<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Pages/NewsOverviewPage/pagetemplate.html.twig */
class __TwigTemplate_4b544dc83a3ecc50de74a88fbfa321b2ed48d7213a11b55da1163042e15f450f extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'breadcrumbs' => [$this, 'block_breadcrumbs'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Pages/NewsOverviewPage/pagetemplate.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Pages/NewsOverviewPage/pagetemplate.html.twig"));
// line 1
$context["currentUrl"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 1, $this->source); })()), "request", [], "any", false, false, false, 1), "attributes", [], "any", false, false, false, 1), "get", [0 => "_nodeTranslation"], "method", false, false, false, 1), "url", [], "any", false, false, false, 1);
// line 2
$context["baseRoute"] = ("_slug" . ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 2, $this->source); })()), "request", [], "any", false, false, false, 2), "attributes", [], "any", false, false, false, 2), "get", [0 => "preview"], "method", false, false, false, 2)) ? ("_preview") : ("")));
// line 3
$context["basePath"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["baseRoute"]) || array_key_exists("baseRoute", $context) ? $context["baseRoute"] : (function () { throw new RuntimeError('Variable "baseRoute" does not exist.', 3, $this->source); })()), ["url" => (isset($context["currentUrl"]) || array_key_exists("currentUrl", $context) ? $context["currentUrl"] : (function () { throw new RuntimeError('Variable "currentUrl" does not exist.', 3, $this->source); })()), "_locale" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "locale", [], "any", false, false, false, 3)]);
// line 4
$context["categoryContext"] = $this->extensions['Kunstmaan\ArticleBundle\Twig\ArticleTwigExtension']->getCategories(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 4, $this->source); })()), "request", [], "any", false, false, false, 4), "App:NewsCategory");
$context["tagContext"] = $this->extensions['Kunstmaan\ArticleBundle\Twig\ArticleTwigExtension']->getTags(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 4, $this->source); })()), "request", [], "any", false, false, false, 4), "App:NewsTag");
// line 5
echo "
<div class=\"news-overview news-page\">
";
// line 9
echo " ";
$this->loadTemplate("Layout/_page-header.html.twig", "Pages/NewsOverviewPage/pagetemplate.html.twig", 9)->display(twig_array_merge($context, ["page" => (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 9, $this->source); })())]));
// line 10
echo "
";
// line 12
echo " ";
$this->displayBlock('breadcrumbs', $context, $blocks);
// line 15
echo "
<div class=\"content\">
<h1 role=\"heading\" aria-level=\"1\">";
// line 18
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 18, $this->source); })()), "pageTitle", [], "any", false, false, false, 18), "html", null, true);
echo "</h1>
<div class=\"blog-filter js-toggle-container\">
<div class=\"blog-filter__top\">
";
// line 23
echo " ";
// line 24
echo " </div>
<div class=\"blog-filter__filters\">
";
// line 27
$this->loadTemplate("Pages/NewsOverviewPage/_list-tag.html.twig", "Pages/NewsOverviewPage/pagetemplate.html.twig", 27)->display(twig_array_merge($context, ["tagContext" => (isset($context["tagContext"]) || array_key_exists("tagContext", $context) ? $context["tagContext"] : (function () { throw new RuntimeError('Variable "tagContext" does not exist.', 27, $this->source); })())]));
// line 28
echo " ";
// line 29
echo " </div>
</div>
</div>
<div class=\"content\">
";
// line 36
$context["count"] = 0;
// line 37
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagerfanta"]) || array_key_exists("pagerfanta", $context) ? $context["pagerfanta"] : (function () { throw new RuntimeError('Variable "pagerfanta" does not exist.', 37, $this->source); })()), "nbResults", [], "any", false, false, false, 37) > 0)) {
// line 38
echo "
<div class=\"row\">
";
// line 41
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($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
echo "
";
// line 43
$context["articlenode"] = $this->extensions['Kunstmaan\NodeBundle\Twig\NodeTwigExtension']->getNodeTranslationFor($context["article"]);
// line 44
echo "
";
// line 45
if ((twig_get_attribute($this->env, $this->source, $context["article"], "listImage", [], "any", false, false, false, 45) && !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["article"], "listImage", [], "any", false, false, false, 45)))) {
// line 46
echo " ";
$context["img"] = twig_first($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "listImage", [], "any", false, false, false, 46));
// line 47
echo " ";
} elseif ((twig_get_attribute($this->env, $this->source, $context["article"], "headerImage", [], "any", false, false, false, 47) && !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["article"], "headerImage", [], "any", false, false, false, 47)))) {
// line 48
echo " ";
$context["img"] = twig_first($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "headerImage", [], "any", false, false, false, 48));
// line 49
echo " ";
} else {
// line 50
echo " ";
$context["img"] = ["cropping" => null, "media" => ["url" => $this->extensions['App\Twig\GcsExtension']->getDefaultArticleImage()], "mediaAlt" => "GdyĆskie Centrum Sportu"];
// line 57
echo " ";
}
// line 58
echo "
<article
class=\"news-box col-md-4";
// line 61
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["article"], "tags", [], "any", false, false, false, 61));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
if ((twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 61) == 3)) {
echo " photo";
}
if ((twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 61) == 2)) {
echo " video";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
echo "\">
<a href=\"";
// line 63
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("_slug", ["url" => twig_get_attribute($this->env, $this->source, (isset($context["articlenode"]) || array_key_exists("articlenode", $context) ? $context["articlenode"] : (function () { throw new RuntimeError('Variable "articlenode" does not exist.', 63, $this->source); })()), "url", [], "any", false, false, false, 63)]), "html", null, true);
echo "\">
<div class=\"news-box__img\">
";
// line 66
if ((((isset($context["img"]) || array_key_exists("img", $context)) && !twig_test_empty((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 66, $this->source); })()))) && !(null === (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 66, $this->source); })())))) {
// line 67
echo " ";
$context["fullSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 67, $this->source); })()), "media", [], "any", false, false, false, 67), "url", [], "any", false, false, false, 67), twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 67, $this->source); })()), "cropping", [], "any", false, false, false, 67), ["w" => 450, "h" => 300, "q" => 80, "fit" => "crop"]]);
// line 68
echo " <img src=\"";
echo twig_escape_filter($this->env, (isset($context["fullSrc"]) || array_key_exists("fullSrc", $context) ? $context["fullSrc"] : (function () { throw new RuntimeError('Variable "fullSrc" does not exist.', 68, $this->source); })()), "html", null, true);
echo "\" alt=\"";
if (twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 68, $this->source); })()), "mediaAlt", [], "any", false, false, false, 68)) {
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 68, $this->source); })()), "mediaAlt", [], "any", false, false, false, 68), "html", null, true);
} else {
echo twig_escape_filter($this->env, strip_tags(twig_get_attribute($this->env, $this->source, $context["article"], "title", [], "any", false, false, false, 68)), "html", null, true);
}
echo "\" />
";
} else {
// line 71
echo " <img src=\"data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==\"
alt=\"\">
";
}
// line 74
echo "
<div class=\"news-box__read-more\">
";
// line 76
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.read-more"), "html", null, true);
echo "
</div>
</div>
<div class=\"news-box__caption\">
<h3 role=\"heading\" aria-level=\"3\">";
// line 80
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "title", [], "any", false, false, false, 80), "html", null, true);
echo "</h3>
</div>
<div class=\"news-box__date\">
<time datetime=\"";
// line 83
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "date", [], "any", false, false, false, 83), "d.m.Y"), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "date", [], "any", false, false, false, 83), "d.m.Y"), "html", null, true);
echo "</time>
</div>
</a>
</article>
";
// line 88
$context["count"] = ((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 88, $this->source); })()) + 1);
// line 89
echo " ";
$context["img"] = null;
// line 90
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['article'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 92
echo "
</div>
";
}
// line 96
echo "
";
// line 97
if (twig_get_attribute($this->env, $this->source, (isset($context["pagerfanta"]) || array_key_exists("pagerfanta", $context) ? $context["pagerfanta"] : (function () { throw new RuntimeError('Variable "pagerfanta" does not exist.', 97, $this->source); })()), "haveToPaginate", [], "method", false, false, false, 97)) {
// line 98
echo " <div class=\"pagination\">
";
// line 99
echo $this->extensions['WhiteOctober\PagerfantaBundle\Twig\PagerfantaExtension']->renderPagerfanta((isset($context["pagerfanta"]) || array_key_exists("pagerfanta", $context) ? $context["pagerfanta"] : (function () { throw new RuntimeError('Variable "pagerfanta" does not exist.', 99, $this->source); })()), null, ["pageParameter" => "[page]", "prev_message" => "<i class=\"fas fa-chevron-left\"></i>", "next_message" => "<i class=\"fas fa-chevron-right\"></i>"]);
// line 103
echo "
</div>
";
}
// line 106
echo "
</div>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 12
public function block_breadcrumbs($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
// line 13
echo " ";
$this->loadTemplate("Layout/_breadcrumbs.html.twig", "Pages/NewsOverviewPage/pagetemplate.html.twig", 13)->display(twig_array_merge($context, ["refererString" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 13, $this->source); })()), "request", [], "any", false, false, false, 13), "get", [0 => "path"], "method", false, false, false, 13)]));
// line 14
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Pages/NewsOverviewPage/pagetemplate.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 280 => 14, 277 => 13, 267 => 12, 252 => 106, 247 => 103, 245 => 99, 242 => 98, 240 => 97, 237 => 96, 231 => 92, 224 => 90, 221 => 89, 219 => 88, 209 => 83, 203 => 80, 196 => 76, 192 => 74, 187 => 71, 174 => 68, 171 => 67, 169 => 66, 163 => 63, 146 => 61, 141 => 58, 138 => 57, 135 => 50, 132 => 49, 129 => 48, 126 => 47, 123 => 46, 121 => 45, 118 => 44, 116 => 43, 113 => 42, 109 => 41, 104 => 38, 101 => 37, 99 => 36, 90 => 29, 88 => 28, 86 => 27, 81 => 24, 79 => 23, 72 => 18, 67 => 15, 64 => 12, 61 => 10, 58 => 9, 53 => 5, 50 => 4, 48 => 3, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% 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 categoryContext = get_article_categories(app.request, 'App:NewsCategory') %}{% set tagContext = get_article_tags(app.request, 'App:NewsTag') %}
<div class=\"news-overview news-page\">
{# Page Header #}
{% include 'Layout/_page-header.html.twig' with { 'page' : page } %}
{# Breadcrumbs #}
{% block breadcrumbs %}
{% include 'Layout/_breadcrumbs.html.twig' with { 'refererString' : app.request.get('path') } %}
{% endblock %}
<div class=\"content\">
<h1 role=\"heading\" aria-level=\"1\">{{ page.pageTitle }}</h1>
<div class=\"blog-filter js-toggle-container\">
<div class=\"blog-filter__top\">
{# {% include 'Pages/NewsOverviewPage/_filter-tag.html.twig' with {'tags': tagContext.tags} %}#}
{# {% include 'Pages/NewsOverviewPage/_filter-category.html.twig' with {'categories': categoryContext.categories} %}#}
</div>
<div class=\"blog-filter__filters\">
{% include 'Pages/NewsOverviewPage/_list-tag.html.twig' with {'tagContext': tagContext} %}
{# {% include 'Pages/NewsOverviewPage/_list-category.html.twig' with {'categoryContext': categoryContext} %}#}
</div>
</div>
</div>
<div class=\"content\">
{% set count = 0 %}
{% if pagerfanta.nbResults > 0 %}
<div class=\"row\">
{% for article in pagerfanta.currentPageResults %}
{% set articlenode = get_node_translation_for(article) %}
{% if article.listImage and article.listImage is not empty %}
{% set img = article.listImage | first %}
{% elseif article.headerImage and article.headerImage is not empty %}
{% set img = article.headerImage | first %}
{% else %}
{% set img = {
'cropping' : null,
'media' : {
'url' : get_default_article_image(),
},
'mediaAlt' : 'GdyĆskie Centrum Sportu'
} %}
{% endif %}
<article
class=\"news-box col-md-4{% for tag in article.tags %}{% if tag.id == 3 %} photo{% endif %}{% if tag.id == 2 %} video{% endif %}{% endfor %}\">
<a href=\"{{ path('_slug', {'url': articlenode.url}) }}\">
<div class=\"news-box__img\">
{% if img is defined and img is not empty and img is not null %}
{% set fullSrc = croppedImgSrc(img.media.url, img.cropping, { w: 450, h: 300, q: 80, fit: 'crop' }) %}
<img src=\"{{ fullSrc }}\" alt=\"{% if img.mediaAlt %}{{ img.mediaAlt }}{% else %}{{ article.title | striptags }}{% endif %}\" />
{% else %}
<img src=\"data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==\"
alt=\"\">
{% endif %}
<div class=\"news-box__read-more\">
{{ 'news.read-more' | trans }}
</div>
</div>
<div class=\"news-box__caption\">
<h3 role=\"heading\" aria-level=\"3\">{{ article.title }}</h3>
</div>
<div class=\"news-box__date\">
<time datetime=\"{{ article.date | date(\"d.m.Y\") }}\">{{ article.date | date(\"d.m.Y\") }}</time>
</div>
</a>
</article>
{% set count = count + 1 %}
{% set img = null %}
{% endfor %}
</div>
{% endif %}
{% if pagerfanta.haveToPaginate() %}
<div class=\"pagination\">
{{ pagerfanta(pagerfanta, null, {
'pageParameter': '[page]',
'prev_message':'<i class=\"fas fa-chevron-left\"></i>',
'next_message':'<i class=\"fas fa-chevron-right\"></i>'
}) }}
</div>
{% endif %}
</div>
</div>
", "Pages/NewsOverviewPage/pagetemplate.html.twig", "/var/www/gcs/html/dev/templates/Pages/NewsOverviewPage/pagetemplate.html.twig");
}
}