<?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_index.html.twig */
class __TwigTemplate_f487311be26140a1f88fd8899fdb95c63757f37f07b39e66b2abd2d9e6f26275 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_index.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_index.html.twig"));
$this->parent = $this->loadTemplate("Layout/base.html.twig", "@VisualMediaBlog/Blog/blog_index.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_index.html.twig", 4)->display(twig_array_merge($context, ["visuals" => 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.', 4, $this->source); })()), "visuals", [], "any", false, false, false, 4)]));
// line 5
echo "
<div id=\"blog_index\" class=\"container\">
";
// line 7
$this->loadTemplate("@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig", "@VisualMediaBlog/Blog/blog_index.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)]]]));
// line 10
echo "
<h1>";
// line 11
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.', 11, $this->source); })()), "title", [], "any", false, false, false, 11), "html", null, true);
echo "</h1>
";
// line 12
echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(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.', 12, $this->source); })()), "htmlContent", [], "any", false, false, false, 12)), "html", null, true);
echo "
<hr>
";
// line 15
if ( !twig_test_empty((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 15, $this->source); })()))) {
// line 16
echo " <div class=\"row\">
";
// line 17
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 17, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 18
echo " <div class=\"col-4 mb-4\">
<h2><a href=\"";
// line 19
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_category", ["categorySlug" => twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 19)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "title", [], "any", false, false, false, 19), "html", null, true);
echo "</a></h2>
<span>Aantal berichten: ";
// line 21
echo twig_escape_filter($this->env, twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "getPosts", [], "method", false, false, false, 21)), "html", null, true);
echo "</span>
<div class=\"intro-text\">
";
// line 24
$context["max"] = 150;
// line 25
echo " ";
$context["content"] = $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env, $this->source, $context["category"], "htmlContent", [], "any", false, false, false, 25));
// line 26
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.', 26, $this->source); })())) > (isset($context["max"]) || array_key_exists("max", $context) ? $context["max"] : (function () { throw new RuntimeError('Variable "max" does not exist.', 26, $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.', 26, $this->source); })()), 0, (isset($context["max"]) || array_key_exists("max", $context) ? $context["max"] : (function () { throw new RuntimeError('Variable "max" does not exist.', 26, $this->source); })())) . "...")) : ((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 26, $this->source); })())));
echo "
</div>
<a href=\"";
// line 29
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_category", ["categorySlug" => twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 29)]), "html", null, true);
echo "\">
<img src=\"";
// line 30
echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigUploadUrl']->url(twig_get_attribute($this->env, $this->source, $context["category"], "upload", [], "any", false, false, false, 30)), "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['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " </div>
";
} else {
// line 36
echo " <p>Er zijn geen categorieën gevonden...</p>
";
}
// line 38
echo " </div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@VisualMediaBlog/Blog/blog_index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 150 => 38, 146 => 36, 142 => 34, 132 => 30, 128 => 29, 121 => 26, 118 => 25, 116 => 24, 110 => 21, 103 => 19, 100 => 18, 96 => 17, 93 => 16, 91 => 15, 85 => 12, 81 => 11, 78 => 10, 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: page.visuals } %}
<div id=\"blog_index\" class=\"container\">
{% include '@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig' with { breadcrumbs: [
{ title: page.title },
] } only %}
<h1>{{ page.title }}</h1>
{{ page.htmlContent|scan }}
<hr>
{% if categories is not empty %}
<div class=\"row\">
{% for category in categories %}
<div class=\"col-4 mb-4\">
<h2><a href=\"{{ path('blog_category', { categorySlug: category.slug }) }}\">{{ category.title }}</a></h2>
<span>Aantal berichten: {{ category.getPosts()|length }}</span>
<div class=\"intro-text\">
{% set max = 150 %}
{% set content = category.htmlContent|scan %}
{{ (content|length > max ? content|slice(0, max) ~ '...' : content)|raw }}
</div>
<a href=\"{{ path('blog_category', { categorySlug: category.slug }) }}\">
<img src=\"{{ category.upload|url }}\" style=\"width: 100%; height: 250px; object-fit: cover;\">
</a>
</div>
{% endfor %}
</div>
{% else %}
<p>Er zijn geen categorieën gevonden...</p>
{% endif %}
</div>
{% endblock %}
", "@VisualMediaBlog/Blog/blog_index.html.twig", "/home/components/public_html/templates/VisualMediaBlogBundle/views/Blog/blog_index.html.twig");
}
}