var/cache/dev/twig/ff/fff8b1bf035630565ddd622ed78428fd.php line 52

  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. /* @OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig */
  14. class __TwigTemplate_e434e20c34a4596dd77caf787afa5b11 extends 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.             'title' => [$this'block_title'],
  24.             'post_header' => [$this'block_post_header'],
  25.             'body' => [$this'block_body'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return $this->loadTemplate(twig_get_attribute($this->env$this->source, (isset($context["nglayouts"]) || array_key_exists("nglayouts"$context) ? $context["nglayouts"] : (function () { throw new RuntimeError('Variable "nglayouts" does not exist.'1$this->source); })()), "layoutTemplate", [], "any"falsefalsefalse1), "@OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig"1);
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig"));
  40.         // line 2
  41.         $macros["pagination"] = $this->macros["pagination"] = $this->loadTemplate("frontend/Macro/pagination.html.twig""@OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig"2)->unwrap();
  42.         // line 1
  43.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  46.         
  47.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48.     }
  49.     // line 3
  50.     public function block_title($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  55.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  57.         echo "Blog
  58. ";
  59.         
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  61.         
  62.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  63.     }
  64.     // line 5
  65.     public function block_post_header($context, array $blocks = [])
  66.     {
  67.         $macros $this->macros;
  68.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""post_header"));
  70.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""post_header"));
  72.         // line 6
  73.         echo "\t<!-- section start-->
  74. \t";
  75.         // line 7
  76.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_cms_plugin_shop_media_render", ["code" => "blog_post_header""template" => "frontend/cms/common/media/_header.html.twig"]));
  77.         echo "
  78. \t<!-- section start-->
  79. ";
  80.         
  81.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  82.         
  83.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  84.     }
  85.     // line 10
  86.     public function block_body($context, array $blocks = [])
  87.     {
  88.         $macros $this->macros;
  89.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  90.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  91.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  92.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  93.         // line 11
  94.         echo "
  95. \t<section class=\"news-section\">
  96. \t\t<div class=\"auto-container\">
  97. \t\t\t";
  98.         // line 14
  99.         if ((twig_length_filter($this->env, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'14$this->source); })())) > 0)) {
  100.             // line 15
  101.             echo "\t\t\t\t<div class=\"row\">
  102. \t\t\t\t\t";
  103.             // line 16
  104.             $context['_parent'] = $context;
  105.             $context['_seq'] = twig_ensure_traversable((isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'16$this->source); })()));
  106.             foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
  107.                 // line 17
  108.                 echo "\t\t\t\t\t\t<!-- News Block -->
  109. \t\t\t\t\t\t<div class=\"news-block col-lg-4 col-md-6 col-sm-12 wow fadeInUp\">
  110. \t\t\t\t\t\t\t<div class=\"inner-box\">
  111. \t\t\t\t\t\t\t\t<div class=\"image-box\">
  112. \t\t\t\t\t\t\t\t\t<figure class=\"image\">
  113. \t\t\t\t\t\t\t\t\t\t<a href=\"";
  114.                 // line 22
  115.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("odiseo_sylius_blog_plugin_shop_article_show", ["slug" => twig_get_attribute($this->env$this->source$context["article"], "slug", [], "any"falsefalsefalse22)]), "html"nulltrue);
  116.                 echo "\"><img style=\"height:270px;\" src=\"";
  117.                 (((twig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "images", [], "any"falsefalsefalse22)) > 0)) ? (print (twig_escape_filter($this->env$this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["article"], "images", [], "any"falsefalsefalse22), 0, [], "array"falsefalsefalse22), "path", [], "any"falsefalsefalse22), ((array_key_exists("filter"$context)) ? (_twig_default_filter((isset($context["filter"]) || array_key_exists("filter"$context) ? $context["filter"] : (function () { throw new RuntimeError('Variable "filter" does not exist.'22$this->source); })()), "sylius_large")) : ("sylius_large"))), "html"nulltrue))) : (print ("https://via.placeholder.com/370x270")));
  118.                 echo "\" alt=\"\"></a>
  119. \t\t\t\t\t\t\t\t\t</figure>
  120. \t\t\t\t\t\t\t\t\t<span class=\"date\">";
  121.                 // line 24
  122.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "createdAt", [], "any"falsefalsefalse24), "d"), "html"nulltrue);
  123.                 echo "
  124. \t\t\t\t\t\t\t\t\t\t<span class=\"month\">";
  125.                 // line 25
  126.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "createdAt", [], "any"falsefalsefalse25), "M-Y"), "html"nulltrue);
  127.                 echo "</span> 
  128. \t\t\t\t\t\t\t\t\t</span>
  129. \t\t\t\t\t\t\t\t</div>
  130. \t\t\t\t\t\t\t\t<div class=\"lower-content\">
  131. \t\t\t\t\t\t\t\t\t<ul class=\"post-info\">
  132. \t\t\t\t\t\t\t\t\t\t<li>
  133. \t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-user-circle\"></i>Admin</li>
  134. \t\t\t\t\t\t\t\t\t\t<li>
  135. \t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-comments\"></i>
  136. \t\t\t\t\t\t\t\t\t\t\t0 Comment</li>
  137. \t\t\t\t\t\t\t\t\t</ul>
  138. \t\t\t\t\t\t\t\t\t<h4 class=\"title\" style=\"height:100px;\">
  139. \t\t\t\t\t\t\t\t\t\t<a href=\"";
  140.                 // line 37
  141.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("odiseo_sylius_blog_plugin_shop_article_show", ["slug" => twig_get_attribute($this->env$this->source$context["article"], "slug", [], "any"falsefalsefalse37)]), "html"nulltrue);
  142.                 echo "\">";
  143.                 echo twig_escape_filter($this->env, (((twig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "title", [], "any"falsefalsefalse37)) > 60)) ? ((twig_slice($this->envtwig_get_attribute($this->env$this->source$context["article"], "title", [], "any"falsefalsefalse37), 050) . "...")) : (twig_get_attribute($this->env$this->source$context["article"], "title", [], "any"falsefalsefalse37))), "html"nulltrue);
  144.                 echo " </a>
  145. \t\t\t\t\t\t\t\t\t</h4>
  146. \t\t\t\t\t\t\t\t\t<div class=\"text\">
  147. \t\t\t\t\t\t\t\t\t\t";
  148.                 // line 40
  149.                 (((twig_length_filter($this->envtwig_striptags(twig_get_attribute($this->env$this->source$context["article"], "content", [], "any"falsefalsefalse40))) > 200)) ? (print (twig_escape_filter($this->env, (twig_slice($this->envtwig_striptags(twig_get_attribute($this->env$this->source$context["article"], "content", [], "any"falsefalsefalse40)), 0200) . "..."), "html"nulltrue))) : (print (twig_striptags(twig_get_attribute($this->env$this->source$context["article"], "content", [], "any"falsefalsefalse40)))));
  150.                 echo 
  151. \t\t\t\t\t\t\t\t\t</div>
  152. \t\t\t\t\t\t\t\t</div>
  153. \t\t\t\t\t\t\t</div>
  154. \t\t\t\t\t\t</div>
  155. \t\t\t\t\t";
  156.             }
  157.             $_parent $context['_parent'];
  158.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['article'], $context['_parent'], $context['loop']);
  159.             $context array_intersect_key($context$_parent) + $_parent;
  160.             // line 46
  161.             echo "\t\t\t\t</div>
  162. \t\t\t</div>
  163. \t\t";
  164.         }
  165.         // line 49
  166.         echo "\t</section> 
  167. ";
  168.         
  169.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  170.         
  171.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  172.     }
  173.     public function getTemplateName()
  174.     {
  175.         return "@OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig";
  176.     }
  177.     public function isTraitable()
  178.     {
  179.         return false;
  180.     }
  181.     public function getDebugInfo()
  182.     {
  183.         return array (  190 => 49,  185 => 46,  173 => 40,  165 => 37,  150 => 25,  146 => 24,  139 => 22,  132 => 17,  128 => 16,  125 => 15,  123 => 14,  118 => 11,  108 => 10,  95 => 7,  92 => 6,  82 => 5,  62 => 3,  52 => 1,  50 => 2,  37 => 1,);
  184.     }
  185.     public function getSourceContext()
  186.     {
  187.         return new Source("{% extends nglayouts.layoutTemplate %}
  188. {% import 'frontend/Macro/pagination.html.twig' as pagination %}
  189. {% block title %}Blog
  190. {% endblock %}
  191. {% block post_header %}
  192. \t<!-- section start-->
  193. \t{{ render(path('bitbag_sylius_cms_plugin_shop_media_render', {'code' : 'blog_post_header', 'template' : 'frontend/cms/common/media/_header.html.twig'})) }}
  194. \t<!-- section start-->
  195. {% endblock %}
  196. {% block body %}
  197. \t<section class=\"news-section\">
  198. \t\t<div class=\"auto-container\">
  199. \t\t\t{% if resources | length > 0 %}
  200. \t\t\t\t<div class=\"row\">
  201. \t\t\t\t\t{% for article in resources %}
  202. \t\t\t\t\t\t<!-- News Block -->
  203. \t\t\t\t\t\t<div class=\"news-block col-lg-4 col-md-6 col-sm-12 wow fadeInUp\">
  204. \t\t\t\t\t\t\t<div class=\"inner-box\">
  205. \t\t\t\t\t\t\t\t<div class=\"image-box\">
  206. \t\t\t\t\t\t\t\t\t<figure class=\"image\">
  207. \t\t\t\t\t\t\t\t\t\t<a href=\"{{ path('odiseo_sylius_blog_plugin_shop_article_show', {'slug' : article.slug}) }}\"><img style=\"height:270px;\" src=\"{{ article.images | length > 0 ? article.images[0].path|imagine_filter(filter|default('sylius_large')): 'https://via.placeholder.com/370x270' }}\" alt=\"\"></a>
  208. \t\t\t\t\t\t\t\t\t</figure>
  209. \t\t\t\t\t\t\t\t\t<span class=\"date\">{{ article.createdAt|date('d') }}
  210. \t\t\t\t\t\t\t\t\t\t<span class=\"month\">{{ article.createdAt|date('M-Y') }}</span> 
  211. \t\t\t\t\t\t\t\t\t</span>
  212. \t\t\t\t\t\t\t\t</div>
  213. \t\t\t\t\t\t\t\t<div class=\"lower-content\">
  214. \t\t\t\t\t\t\t\t\t<ul class=\"post-info\">
  215. \t\t\t\t\t\t\t\t\t\t<li>
  216. \t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-user-circle\"></i>Admin</li>
  217. \t\t\t\t\t\t\t\t\t\t<li>
  218. \t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-comments\"></i>
  219. \t\t\t\t\t\t\t\t\t\t\t0 Comment</li>
  220. \t\t\t\t\t\t\t\t\t</ul>
  221. \t\t\t\t\t\t\t\t\t<h4 class=\"title\" style=\"height:100px;\">
  222. \t\t\t\t\t\t\t\t\t\t<a href=\"{{ path('odiseo_sylius_blog_plugin_shop_article_show', {'slug' : article.slug}) }}\">{{article.title|length > 60 ? article.title|slice(0, 50)|raw ~ '...' : article.title}} </a>
  223. \t\t\t\t\t\t\t\t\t</h4>
  224. \t\t\t\t\t\t\t\t\t<div class=\"text\">
  225. \t\t\t\t\t\t\t\t\t\t{{ article.content | striptags | length > 200 ? article.content|striptags|slice(0, 200)|raw ~ '...' : article.content|striptags|raw }} 
  226. \t\t\t\t\t\t\t\t\t</div>
  227. \t\t\t\t\t\t\t\t</div>
  228. \t\t\t\t\t\t\t</div>
  229. \t\t\t\t\t\t</div>
  230. \t\t\t\t\t{% endfor %}
  231. \t\t\t\t</div>
  232. \t\t\t</div>
  233. \t\t{% endif %}
  234. \t</section> 
  235. {% endblock %}
  236. ""@OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig""/srv/sylius/templates/bundles/OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig");
  237.     }
  238. }