var/cache/dev/twig/17/17ff7a6005435a1ad69c323ed7e809afd73c9989f08fe1e83abb6fd33111e68b.php line 38

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @VisualMediaBlog/Blog/blog_category.html.twig */
  14. class __TwigTemplate_31ebdb8a1de1a1cf68395992b51f83d5e5d236653b2eecf84d3ef968e65ed716 extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'main' => [$this'block_main'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "Layout/base.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@VisualMediaBlog/Blog/blog_category.html.twig"));
  36.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@VisualMediaBlog/Blog/blog_category.html.twig"));
  38.         $this->parent $this->loadTemplate("Layout/base.html.twig""@VisualMediaBlog/Blog/blog_category.html.twig"1);
  39.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  40.         
  41.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  42.         
  43.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  44.     }
  45.     // line 3
  46.     public function block_main($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  51.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  53.         // line 4
  54.         echo "    ";
  55.         $this->loadTemplate("@VisualMediaVisual/Visual/visual.html.twig""@VisualMediaBlog/Blog/blog_category.html.twig"4)->display(twig_array_merge($context, ["visuals" => [=> (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'4$this->source); })())]]));
  56.         // line 5
  57.         echo "
  58.     <div id=\"blog_category\" class=\"container\">
  59.         ";
  60.         // line 7
  61.         $this->loadTemplate("@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig""@VisualMediaBlog/Blog/blog_category.html.twig"7)->display(twig_to_array(["breadcrumbs" => [=> ["title" => twig_get_attribute($this->env$this->source,         // line 8
  62. (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'8$this->source); })()), "title", [], "any"falsefalsefalse8), "path" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_index")], => ["title" => twig_get_attribute($this->env$this->source,         // line 9
  63. (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'9$this->source); })()), "title", [], "any"falsefalsefalse9)]]]));
  64.         // line 11
  65.         echo "
  66.         <h1>";
  67.         // line 12
  68.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse12), "html"nulltrue);
  69.         echo "</h1>
  70.         ";
  71.         // line 13
  72.         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"falsefalsefalse13)), "html"nulltrue);
  73.         echo "
  74.         <hr>
  75.         ";
  76.         // line 16
  77.         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); })()))) {
  78.             // line 17
  79.             echo "            <div class=\"row\">
  80.                 ";
  81.             // line 18
  82.             $context['_parent'] = $context;
  83.             $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); })()));
  84.             foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
  85.                 // line 19
  86.                 echo "                    <div class=\"col-4 mb-4\">
  87.                         ";
  88.                 // line 24
  89.                 echo "
  90.                         <h2><a href=\"";
  91.                 // line 25
  92.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_post", ["categorySlug" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "mainCategory", [], "any"falsefalsefalse25), "slug", [], "any"falsefalsefalse25), "postSlug" => twig_get_attribute($this->env$this->source$context["post"], "slug", [], "any"falsefalsefalse25)]), "html"nulltrue);
  93.                 echo "\">";
  94.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse25), "html"nulltrue);
  95.                 echo "</a></h2>
  96.                         <span>Gepubliceerd op: ";
  97.                 // line 27
  98.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["post"], "publicationDate", [], "any"falsefalsefalse27), "d-m-Y"), "html"nulltrue);
  99.                 echo "</span>
  100.                         <div class=\"intro-text\">
  101.                             ";
  102.                 // line 30
  103.                 $context["max"] = 150;
  104.                 // line 31
  105.                 echo "                            ";
  106.                 $context["content"] = $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env$this->source$context["post"], "htmlContentIntro", [], "any"falsefalsefalse31));
  107.                 // line 32
  108.                 echo "                            ";
  109.                 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); })())));
  110.                 echo "
  111.                         </div>
  112.                         <a href=\"";
  113.                 // line 35
  114.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_post", ["categorySlug" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "mainCategory", [], "any"falsefalsefalse35), "slug", [], "any"falsefalsefalse35), "postSlug" => twig_get_attribute($this->env$this->source$context["post"], "slug", [], "any"falsefalsefalse35)]), "html"nulltrue);
  115.                 echo "\">
  116.                             <img src=\"";
  117.                 // line 36
  118.                 echo twig_escape_filter($this->env$this->extensions['VisualMedia\LisaBundle\Twig\TwigUploadUrl']->url(twig_get_attribute($this->env$this->source$context["post"], "upload", [], "any"falsefalsefalse36)), "html"nulltrue);
  119.                 echo "\" style=\"width: 100%; height: 250px; object-fit: cover;\">
  120.                         </a>
  121.                     </div>
  122.                 ";
  123.             }
  124.             $_parent $context['_parent'];
  125.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
  126.             $context array_intersect_key($context$_parent) + $_parent;
  127.             // line 40
  128.             echo "            </div>
  129.         ";
  130.         } else {
  131.             // line 42
  132.             echo "            <p>Er zijn geen berichten gevonden...</p>
  133.         ";
  134.         }
  135.         // line 44
  136.         echo "    </div>
  137. ";
  138.         
  139.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  140.         
  141.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  142.     }
  143.     public function getTemplateName()
  144.     {
  145.         return "@VisualMediaBlog/Blog/blog_category.html.twig";
  146.     }
  147.     public function isTraitable()
  148.     {
  149.         return false;
  150.     }
  151.     public function getDebugInfo()
  152.     {
  153.         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,);
  154.     }
  155.     public function getSourceContext()
  156.     {
  157.         return new Source("{% extends 'Layout/base.html.twig' %}
  158. {% block main %}
  159.     {% include '@VisualMediaVisual/Visual/visual.html.twig' with { visuals: [ category ] } %}
  160.     <div id=\"blog_category\" class=\"container\">
  161.         {% include '@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig' with { breadcrumbs: [
  162.             { title: page.title, path: path('blog_index') },
  163.             { title: category.title },
  164.         ] } only %}
  165.         <h1>{{ category.title }}</h1>
  166.         {{ category.htmlContent|scan }}
  167.         <hr>
  168.         {% if posts is not empty %}
  169.             <div class=\"row\">
  170.                 {% for post in posts %}
  171.                     <div class=\"col-4 mb-4\">
  172.                         {#
  173.                         {% for test in post.mainCategory.posts %}{% endfor %}
  174.                         {{ dump(post.mainCategory) }}
  175.                         #}
  176.                         <h2><a href=\"{{ path('blog_post', { categorySlug: post.mainCategory.slug, postSlug: post.slug }) }}\">{{ post.title }}</a></h2>
  177.                         <span>Gepubliceerd op: {{ post.publicationDate|date('d-m-Y') }}</span>
  178.                         <div class=\"intro-text\">
  179.                             {% set max = 150 %}
  180.                             {% set content = post.htmlContentIntro|scan %}
  181.                             {{ (content|length > max ? content|slice(0, max) ~ '...' : content)|raw }}
  182.                         </div>
  183.                         <a href=\"{{ path('blog_post', { categorySlug: post.mainCategory.slug, postSlug: post.slug }) }}\">
  184.                             <img src=\"{{ post.upload|url }}\" style=\"width: 100%; height: 250px; object-fit: cover;\">
  185.                         </a>
  186.                     </div>
  187.                 {% endfor %}
  188.             </div>
  189.         {% else %}
  190.             <p>Er zijn geen berichten gevonden...</p>
  191.         {% endif %}
  192.     </div>
  193. {% endblock %}
  194. ""@VisualMediaBlog/Blog/blog_category.html.twig""/home/components/public_html/templates/VisualMediaBlogBundle/views/Blog/blog_category.html.twig");
  195.     }
  196. }