<?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/_list-tag.html.twig */
class __TwigTemplate_0f8cd310ef1cb78a6fa7a71c245facad747397a30c4294cd85687c02986849f8 extends \Twig\Template
{
private $source;
private $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 = [])
{
$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/_list-tag.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/_list-tag.html.twig"));
// line 1
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["tagContext"]) || array_key_exists("tagContext", $context) ? $context["tagContext"] : (function () { throw new RuntimeError('Variable "tagContext" does not exist.', 1, $this->source); })()), "tags", [], "any", false, false, false, 1)) > 0)) {
// line 2
echo "
<div id=\"blog-tags\" class=\"toggle-item ";
// line 3
if (twig_get_attribute($this->env, $this->source, ($context["tagContext"] ?? null), "activeTags", [], "any", true, true, false, 3)) {
echo "toggle-item--active";
}
echo " blog-filter__filters__list\">
<a class=\"btn btn--small ";
// line 5
if ( !twig_get_attribute($this->env, $this->source, ($context["tagContext"] ?? null), "activeTags", [], "any", true, true, false, 5)) {
echo "btn--secondary";
} else {
echo "btn--primary";
}
echo "\" href=\"";
echo twig_escape_filter($this->env, (isset($context["basePath"]) || array_key_exists("basePath", $context) ? $context["basePath"] : (function () { throw new RuntimeError('Variable "basePath" does not exist.', 5, $this->source); })()), "html", null, true);
if ( !twig_test_empty(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.', 5, $this->source); })()), "request", [], "any", false, false, false, 5), "get", [0 => "category"], "method", false, false, false, 5))) {
echo "?category=";
echo twig_escape_filter($this->env, 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.', 5, $this->source); })()), "request", [], "any", false, false, false, 5), "get", [0 => "category"], "method", false, false, false, 5), "html", null, true);
}
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("article_overview_page.all"), "html", null, true);
echo "</a>
";
// line 7
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["tagContext"]) || array_key_exists("tagContext", $context) ? $context["tagContext"] : (function () { throw new RuntimeError('Variable "tagContext" does not exist.', 7, $this->source); })()), "tags", [], "any", false, false, false, 7));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 8
echo " <a class=\"btn btn--small ";
if ((twig_get_attribute($this->env, $this->source, ($context["tagContext"] ?? null), "activeTags", [], "any", true, true, false, 8) && twig_in_filter(twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 8), twig_get_attribute($this->env, $this->source, (isset($context["tagContext"]) || array_key_exists("tagContext", $context) ? $context["tagContext"] : (function () { throw new RuntimeError('Variable "tagContext" does not exist.', 8, $this->source); })()), "activeTags", [], "any", false, false, false, 8)))) {
echo "btn--secondary";
} else {
echo "btn--primary";
}
echo "\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Kunstmaan\ArticleBundle\Twig\ArticleTwigExtension']->getArticleTagRouterPath((isset($context["currentUrl"]) || array_key_exists("currentUrl", $context) ? $context["currentUrl"] : (function () { throw new RuntimeError('Variable "currentUrl" does not exist.', 8, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 8), 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.', 8, $this->source); })()), "request", [], "any", false, false, false, 8), "locale", [], "any", false, false, false, 8)), "html", null, true);
if ( !twig_test_empty(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.', 8, $this->source); })()), "request", [], "any", false, false, false, 8), "get", [0 => "category"], "method", false, false, false, 8))) {
echo "&category=";
echo twig_escape_filter($this->env, 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.', 8, $this->source); })()), "request", [], "any", false, false, false, 8), "get", [0 => "category"], "method", false, false, false, 8), "html", null, true);
}
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, false, 8)), "html", null, true);
echo "</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 10
echo "
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Pages/NewsOverviewPage/_list-tag.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 97 => 10, 76 => 8, 72 => 7, 55 => 5, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if tagContext.tags|length > 0 %}
<div id=\"blog-tags\" class=\"toggle-item {% if tagContext.activeTags is defined %}toggle-item--active{% endif %} blog-filter__filters__list\">
<a class=\"btn btn--small {% if tagContext.activeTags is not defined %}btn--secondary{% else %}btn--primary{% endif %}\" href=\"{{ basePath }}{% if (app.request.get('category') is not empty) %}?category={{ app.request.get('category') }}{% endif %}\">{{ 'article_overview_page.all'|trans }}</a>
{% for tag in tagContext.tags %}
<a class=\"btn btn--small {% if tagContext.activeTags is defined and tag.id in tagContext.activeTags %}btn--secondary{% else %}btn--primary{% endif %}\" href=\"{{ get_article_tag_path(currentUrl, tag.id, app.request.locale) }}{% if (app.request.get('category') is not empty) %}&category={{ app.request.get('category') }}{% endif %}\">{{ tag.name|trans }}</a>
{% endfor %}
</div>
{% endif %}
", "Pages/NewsOverviewPage/_list-tag.html.twig", "/var/www/gcs/html/dev/templates/Pages/NewsOverviewPage/_list-tag.html.twig");
}
}