<?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;
/* @VisualMediaBlog/Blog/blog_category.html.twig */
class __TwigTemplate_31ebdb8a1de1a1cf68395992b51f83d5e5d236653b2eecf84d3ef968e65ed716 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "Layout/base.html.twig";
}
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", "@VisualMediaBlog/Blog/blog_category.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@VisualMediaBlog/Blog/blog_category.html.twig"));
$this->parent = $this->loadTemplate("Layout/base.html.twig", "@VisualMediaBlog/Blog/blog_category.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_main($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", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 4
echo " ";
$this->loadTemplate("@VisualMediaVisual/Visual/visual.html.twig", "@VisualMediaBlog/Blog/blog_category.html.twig", 4)->display(twig_array_merge($context, ["visuals" => [0 => (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 4, $this->source); })())]]));
// line 5
echo "
<div id=\"blog_category\" class=\"container\">
";
// line 7
$this->loadTemplate("@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig", "@VisualMediaBlog/Blog/blog_category.html.twig", 7)->display(twig_to_array(["breadcrumbs" => [0 => ["title" => twig_get_attribute($this->env, $this->source, // line 8
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 8, $this->source); })()), "title", [], "any", false, false, false, 8), "path" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_index")], 1 => ["title" => twig_get_attribute($this->env, $this->source, // line 9
(isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 9, $this->source); })()), "title", [], "any", false, false, false, 9)]]]));
// line 11
echo "
<h1>";
// line 12
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 12, $this->source); })()), "title", [], "any", false, false, false, 12), "html", null, true);
echo "</h1>
";
// line 13
echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 13, $this->source); })()), "htmlContent", [], "any", false, false, false, 13)), "html", null, true);
echo "
<hr>
";
// line 16
if ( !twig_test_empty((isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 16, $this->source); })()))) {
// line 17
echo " <div class=\"row\">
";
// line 18
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 18, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 19
echo " <div class=\"col-4 mb-4\">
";
// line 24
echo "
<h2><a href=\"";
// line 25
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_post", ["categorySlug" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "mainCategory", [], "any", false, false, false, 25), "slug", [], "any", false, false, false, 25), "postSlug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 25)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 25), "html", null, true);
echo "</a></h2>
<span>Gepubliceerd op: ";
// line 27
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "publicationDate", [], "any", false, false, false, 27), "d-m-Y"), "html", null, true);
echo "</span>
<div class=\"intro-text\">
";
// line 30
$context["max"] = 150;
// line 31
echo " ";
$context["content"] = $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env, $this->source, $context["post"], "htmlContentIntro", [], "any", false, false, false, 31));
// line 32
echo " ";
echo (((twig_length_filter($this->env, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 32, $this->source); })())) > (isset($context["max"]) || array_key_exists("max", $context) ? $context["max"] : (function () { throw new RuntimeError('Variable "max" does not exist.', 32, $this->source); })()))) ? ((twig_slice($this->env, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 32, $this->source); })()), 0, (isset($context["max"]) || array_key_exists("max", $context) ? $context["max"] : (function () { throw new RuntimeError('Variable "max" does not exist.', 32, $this->source); })())) . "...")) : ((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 32, $this->source); })())));
echo "
</div>
<a href=\"";
// line 35
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_post", ["categorySlug" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "mainCategory", [], "any", false, false, false, 35), "slug", [], "any", false, false, false, 35), "postSlug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 35)]), "html", null, true);
echo "\">
<img src=\"";
// line 36
echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigUploadUrl']->url(twig_get_attribute($this->env, $this->source, $context["post"], "upload", [], "any", false, false, false, 36)), "html", null, true);
echo "\" style=\"width: 100%; height: 250px; object-fit: cover;\">
</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 40
echo " </div>
";
} else {
// line 42
echo " <p>Er zijn geen berichten gevonden...</p>
";
}
// line 44
echo " </div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@VisualMediaBlog/Blog/blog_category.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 154 => 44, 150 => 42, 146 => 40, 136 => 36, 132 => 35, 125 => 32, 122 => 31, 120 => 30, 114 => 27, 107 => 25, 104 => 24, 101 => 19, 97 => 18, 94 => 17, 92 => 16, 86 => 13, 82 => 12, 79 => 11, 77 => 9, 76 => 8, 75 => 7, 71 => 5, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'Layout/base.html.twig' %}
{% block main %}
{% include '@VisualMediaVisual/Visual/visual.html.twig' with { visuals: [ category ] } %}
<div id=\"blog_category\" class=\"container\">
{% include '@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig' with { breadcrumbs: [
{ title: page.title, path: path('blog_index') },
{ title: category.title },
] } only %}
<h1>{{ category.title }}</h1>
{{ category.htmlContent|scan }}
<hr>
{% if posts is not empty %}
<div class=\"row\">
{% for post in posts %}
<div class=\"col-4 mb-4\">
{#
{% for test in post.mainCategory.posts %}{% endfor %}
{{ dump(post.mainCategory) }}
#}
<h2><a href=\"{{ path('blog_post', { categorySlug: post.mainCategory.slug, postSlug: post.slug }) }}\">{{ post.title }}</a></h2>
<span>Gepubliceerd op: {{ post.publicationDate|date('d-m-Y') }}</span>
<div class=\"intro-text\">
{% set max = 150 %}
{% set content = post.htmlContentIntro|scan %}
{{ (content|length > max ? content|slice(0, max) ~ '...' : content)|raw }}
</div>
<a href=\"{{ path('blog_post', { categorySlug: post.mainCategory.slug, postSlug: post.slug }) }}\">
<img src=\"{{ post.upload|url }}\" style=\"width: 100%; height: 250px; object-fit: cover;\">
</a>
</div>
{% endfor %}
</div>
{% else %}
<p>Er zijn geen berichten gevonden...</p>
{% endif %}
</div>
{% endblock %}
", "@VisualMediaBlog/Blog/blog_category.html.twig", "/home/components/public_html/templates/VisualMediaBlogBundle/views/Blog/blog_category.html.twig");
}
}