<?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;
/* news/overview.html.twig */
class __TwigTemplate_18d4e3de308730bd552a36e407bfc8b3 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return $this->loadTemplate($this->extensions['App\Twig\Extension\WebsiteExtension']->getBaseLayout(), "news/overview.html.twig", 1);
}
protected function doDisplay(array $context, array $blocks = [])
{
$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", "news/overview.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/overview.html.twig"));
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo " <div class=\"container mb-5\">
";
// line 6
echo twig_include($this->env, $context, "includes/title.html.twig");
echo "
<div class=\"row\">
<div class=\"col-12\">
";
// line 10
echo twig_include($this->env, $context, "includes/default-content.html.twig");
echo "
</div>
</div>
</div>
<section class=\"\">
<div class=\"container pb-5\">
<div class=\"row\">
<div class=\"col-12\">
";
// line 22
if (array_key_exists("news", $context)) {
// line 23
echo " <div class=\"row row-cols-lg-3 g-3\">
";
// line 25
if (array_key_exists("news", $context)) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 26, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["new"]) {
// line 27
echo " <div class=\"col homenews-item\">
<div class=\"bg-light-grey h-100\">
";
// line 31
if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "publicationHeader"], "method", false, false, true, 31), "isEmpty", [], "method", false, false, true, 31)) {
// line 32
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["new"], "getFullPath", [], "method", false, false, true, 32), 32, $this->source), "html", null, true);
echo "\">
<div class=\"image position-relative\">
<img class=\"w-100 h-auto\"
src=\"";
// line 36
if (twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "publicationHeader"], "method", false, false, true, 36)) {
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "publicationHeader"], "method", false, false, true, 36), "getThumbnail", [0 => "homepage-news"], "method", false, false, true, 36), 36, $this->source), "html", null, true);
} else {
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $this->extensions['App\Twig\Extension\PlaceholderImageExtension']->placeholder(), "getThumbnail", [0 => "homepage-news"], "method", false, false, true, 36), 36, $this->source), "html", null, true);
}
echo "\">
</div>
</a>
";
}
// line 40
echo " <div class=\"p-3 h-100\">
<header class=\"mt-2 mb-1 text-primary fs-3\">
<a href=\"";
// line 43
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["new"], "getFullPath", [], "method", false, false, true, 43), 43, $this->source), "html", null, true);
echo "\">
";
// line 44
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "newsTitle"], "method", false, false, true, 44), 44, $this->source), "html", null, true);
echo "</a>
</header>
";
// line 47
if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "publicationDate"], "method", false, false, true, 47), "isEmpty", [], "method", false, false, true, 47)) {
// line 48
echo " ";
// line 49
echo " <small class=\"text-uppercase fst-italic text-black text-opacity-50\">";
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "publicationDate"], "method", false, false, true, 49), "getData", [], "method", false, false, true, 49), 49, $this->source), "none", "d MMM Y", null, "gregorian", $this->sandbox->ensureToStringAllowed(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.', 49, $this->source); })()), "request", [], "any", false, false, true, 49), "locale", [], "any", false, false, true, 49), 49, $this->source)), "html", null, true);
echo "</small>
";
}
// line 51
echo "
";
// line 52
if (twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "newsContent"], "method", true, true, true, 52)) {
// line 53
echo " <div class=\"d-inline-block mt-2\">
<p><a class=\"text-black\" href=\"";
// line 54
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["new"], "getFullPath", [], "method", false, false, true, 54), 54, $this->source), "html", null, true);
echo "\">
";
// line 55
echo twig_escape_filter($this->env, $this->extensions['App\Twig\Extension\TruncateExtension']->truncateContent($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["new"], "getEditable", [0 => "newsContent"], "method", false, false, true, 55), 55, $this->source), 230, "..."), "html", null, true);
echo "</a>
</p>
</div>
";
}
// line 59
echo "
";
// line 69
echo " </div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['new'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 74
echo " ";
}
// line 75
echo "
";
// line 81
echo " </div>
<div class=\"load-more-items py-3\">
<div class=\"aligner\">
<div class=\"loading-circle loading-bar-primary loading-bg-default mx-auto\"></div>
</div>
<input type=\"hidden\" class=\"pageCounter\" value=\"1\">
</div>
";
}
// line 91
echo " </div>
</div>
</div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "news/overview.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 211 => 91, 199 => 81, 195 => 75, 192 => 74, 182 => 69, 179 => 59, 172 => 55, 168 => 54, 165 => 53, 163 => 52, 160 => 51, 154 => 49, 152 => 48, 150 => 47, 144 => 44, 140 => 43, 135 => 40, 124 => 36, 116 => 32, 114 => 31, 108 => 27, 103 => 26, 101 => 25, 97 => 23, 95 => 22, 80 => 10, 73 => 6, 69 => 4, 59 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends base_layout() %}
{% block content %}
<div class=\"container mb-5\">
{{ include('includes/title.html.twig') }}
<div class=\"row\">
<div class=\"col-12\">
{{ include('includes/default-content.html.twig') }}
</div>
</div>
</div>
<section class=\"\">
<div class=\"container pb-5\">
<div class=\"row\">
<div class=\"col-12\">
{% if news is defined %}
<div class=\"row row-cols-lg-3 g-3\">
{% if news is defined %}
{% for new in news %}
<div class=\"col homenews-item\">
<div class=\"bg-light-grey h-100\">
{% if not new.getEditable('publicationHeader').isEmpty() %}
<a href=\"{{ new.getFullPath() }}\">
<div class=\"image position-relative\">
<img class=\"w-100 h-auto\"
src=\"{% if new.getEditable('publicationHeader') %}{{ new.getEditable('publicationHeader').getThumbnail('homepage-news') }}{% else %}{{ app_placeholderImage().getThumbnail('homepage-news') }}{% endif %}\">
</div>
</a>
{% endif %}
<div class=\"p-3 h-100\">
<header class=\"mt-2 mb-1 text-primary fs-3\">
<a href=\"{{ new.getFullPath() }}\">
{{ new.getEditable('newsTitle') }}</a>
</header>
{% if not new.getEditable('publicationDate').isEmpty() %}
{# <small class=\"text-uppercase\">{{ app_blog_date(article.getEditable('publicationDate').getData()) }}</small>#}
<small class=\"text-uppercase fst-italic text-black text-opacity-50\">{{ new.getEditable('publicationDate').getData()|format_date('none', 'd MMM Y', null, 'gregorian', app.request.locale) }}</small>
{% endif %}
{% if new.getEditable('newsContent') is defined %}
<div class=\"d-inline-block mt-2\">
<p><a class=\"text-black\" href=\"{{ new.getFullPath() }}\">
{{ new.getEditable('newsContent')|truncate(230, '...') }}</a>
</p>
</div>
{% endif %}
{#
<div class=\"position-absolute pos-b-0 mt-1\">
<a class=\"btn btn-primary\" href=\"{{ new.getFullPath() }}\">
<span class=\"mr-2\">
{{ 'lees meer'|trans }}
</span>
<i class=\"fas fa-long-arrow-alt-right\"></i>
</a>
</div> #}
</div>
</div>
</div>
{% endfor %}
{% endif %}
{#
{{ include('includes/news/detail.html.twig', {
'news': news
}) }} #}
</div>
<div class=\"load-more-items py-3\">
<div class=\"aligner\">
<div class=\"loading-circle loading-bar-primary loading-bg-default mx-auto\"></div>
</div>
<input type=\"hidden\" class=\"pageCounter\" value=\"1\">
</div>
{% endif %}
</div>
</div>
</div>
</section>
{% endblock %}", "news/overview.html.twig", "/var/www/clients/client2/web42/web/pc/templates/news/overview.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 22, "for" => 26);
static $filters = array("escape" => 32, "format_date" => 49, "truncate" => 55);
static $functions = array("include" => 6, "app_placeholderImage" => 36, "base_layout" => 1);
try {
$this->sandbox->checkSecurity(
['if', 'for'],
['escape', 'format_date', 'truncate'],
['include', 'app_placeholderImage', 'base_layout']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}