var/cache/dev/twig/7a/7aa81626f333b1952cc2bf169cbef5fd.php line 58

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