var/cache/dev/twig/a2/a2cb3d824bb193f9b81136218fee4258.php line 151

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. /* news/listing.html.twig */
  14. class __TwigTemplate_cd844f0f46ae6770dd0eb5eb05f93a70 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.             'content' => [$this'block_content'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "layouts/layout.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""news/listing.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""news/listing.html.twig"));
  38.         $this->parent $this->loadTemplate("layouts/layout.html.twig""news/listing.html.twig"1);
  39.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  40.         
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  42.         
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  44.     }
  45.     // line 4
  46.     public function block_content($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         // line 5
  54.         echo "
  55.     <div id=\"main-content\" class=\"main-content\">
  56.         ";
  57.         // line 8
  58.         if (twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'8$this->source); })()), "getTitle", [], "method"falsefalsefalse8))) {
  59.             // line 9
  60.             echo "            ";
  61.             call_user_func_array($this->env->getFunction('pimcore_head_title')->getCallable(), [twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""headline"), "getData", [], "method"falsefalsefalse9), "PREPEND"]);
  62.             // line 10
  63.             echo "        ";
  64.         }
  65.         // line 11
  66.         echo "
  67.         <div class=\"page-header\">
  68.             <h1>";
  69.         // line 13
  70.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""headline", ["placeholder" => "Headline"]);
  71.         echo "</h1>
  72.         </div>
  73.         ";
  74.         // line 16
  75.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"areablock""content", ["allowed" => [=> "headlines"=> "hero-teaser"=> "horizontal-line"=> "wysiwyg"]]);
  76.         // line 25
  77.         echo "
  78.         <div class=\"row\">
  79.             <ul class=\"list-unstyled\">
  80.                 ";
  81.         // line 29
  82.         $context['_parent'] = $context;
  83.         $context['_seq'] = twig_ensure_traversable($context["news"]);
  84.         foreach ($context['_seq'] as $context["_key"] => $context["news"]) {
  85.             // line 30
  86.             echo "                    ";
  87.             // line 31
  88.             echo "                    ";
  89.             $context["detailLink"] = $this->extensions['App\Twig\Extension\NewsExtension']->generateLink($context["news"]);
  90.             // line 32
  91.             echo "
  92.                     <li class=\"media my-3\">
  93.                         ";
  94.             // line 34
  95.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["news"], "gallery", [], "any"falsefalsefalse34), "items", [], "any"falsefalsefalse34)) {
  96.                 // line 35
  97.                 echo "                            ";
  98.                 $context["image"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["news"], "gallery", [], "any"falsefalsefalse35), "current", [], "any"falsefalsefalse35);
  99.                 // line 36
  100.                 echo "
  101.                             ";
  102.                 // line 37
  103.                 if (twig_get_attribute($this->env$this->source, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'37$this->source); })()), "image", [], "any"falsefalsefalse37)) {
  104.                     // line 38
  105.                     echo "                                <a href=\"";
  106.                     echo twig_escape_filter($this->env, (isset($context["detailLink"]) || array_key_exists("detailLink"$context) ? $context["detailLink"] : (function () { throw new RuntimeError('Variable "detailLink" does not exist.'38$this->source); })()), "html"nulltrue);
  107.                     echo "\">
  108.                                     ";
  109.                     // line 39
  110.                     echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'39$this->source); })()), "image", [], "any"falsefalsefalse39), "thumbnail", [=> "newsList"], "method"falsefalsefalse39), "html", [=> ["imgAttributes" => ["class" => "mr-3"]]], "method"falsefalsefalse39);
  111.                     echo "
  112.                                 </a>
  113.                             ";
  114.                 }
  115.                 // line 42
  116.                 echo "                        ";
  117.             }
  118.             // line 43
  119.             echo "
  120.                         <div class=\"media-body\">
  121.                             <h5 class=\"mt-0\">
  122.                                 <a href=\"";
  123.             // line 46
  124.             echo twig_escape_filter($this->env, (isset($context["detailLink"]) || array_key_exists("detailLink"$context) ? $context["detailLink"] : (function () { throw new RuntimeError('Variable "detailLink" does not exist.'46$this->source); })()), "html"nulltrue);
  125.             echo "\" class=\"text-decoration-none text-dark\">
  126.                                     ";
  127.             // line 47
  128.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["news"], "title", [], "any"falsefalsefalse47), "html"nulltrue);
  129.             echo "
  130.                                 </a>
  131.                             </h5>
  132.                             ";
  133.             // line 50
  134.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["news"], "shortText", [], "any"falsefalsefalse50), "html"nulltrue);
  135.             echo "
  136.                         </div>
  137.                     </li>
  138.                 ";
  139.         }
  140.         $_parent $context['_parent'];
  141.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['news'], $context['_parent'], $context['loop']);
  142.         $context array_intersect_key($context$_parent) + $_parent;
  143.         // line 54
  144.         echo "            </ul>
  145.         </div>
  146.         <div class=\"pt-5\">
  147.             ";
  148.         // line 59
  149.         $this->loadTemplate("includes/pagination.html.twig""news/listing.html.twig"59)->display($context);
  150.         // line 60
  151.         echo "
  152.         </div>
  153.     </div>
  154. ";
  155.         
  156.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  157.         
  158.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  159.     }
  160.     public function getTemplateName()
  161.     {
  162.         return "news/listing.html.twig";
  163.     }
  164.     public function isTraitable()
  165.     {
  166.         return false;
  167.     }
  168.     public function getDebugInfo()
  169.     {
  170.         return array (  170 => 60,  168 => 59,  161 => 54,  151 => 50,  145 => 47,  141 => 46,  136 => 43,  133 => 42,  127 => 39,  122 => 38,  120 => 37,  117 => 36,  114 => 35,  112 => 34,  108 => 32,  105 => 31,  103 => 30,  99 => 29,  93 => 25,  91 => 16,  85 => 13,  81 => 11,  78 => 10,  75 => 9,  73 => 8,  68 => 5,  58 => 4,  35 => 1,);
  171.     }
  172.     public function getSourceContext()
  173.     {
  174.         return new Source("{% extends 'layouts/layout.html.twig' %}
  175. {% block content %}
  176.     <div id=\"main-content\" class=\"main-content\">
  177.         {% if document.getTitle() is empty %}
  178.             {% do pimcore_head_title(pimcore_input('headline').getData(), 'PREPEND') %}
  179.         {% endif %}
  180.         <div class=\"page-header\">
  181.             <h1>{{ pimcore_input('headline', {'placeholder':'Headline'}) }}</h1>
  182.         </div>
  183.         {{
  184.             pimcore_areablock('content', {
  185.                 'allowed': [
  186.                     'headlines',
  187.                     'hero-teaser',
  188.                     'horizontal-line',
  189.                     'wysiwyg'
  190.                 ]
  191.             })
  192.         }}
  193.         <div class=\"row\">
  194.             <ul class=\"list-unstyled\">
  195.                 {%  for news in news %}
  196.                     {# @var news \\Pimcore\\Model\\DataObject\\News #}
  197.                     {% set detailLink = app_news_detaillink(news) %}
  198.                     <li class=\"media my-3\">
  199.                         {% if news.gallery.items %}
  200.                             {% set image = news.gallery.current %}
  201.                             {% if image.image %}
  202.                                 <a href=\"{{ detailLink }}\">
  203.                                     {{ image.image.thumbnail('newsList').html({imgAttributes: {class: 'mr-3'}}) | raw }}
  204.                                 </a>
  205.                             {% endif %}
  206.                         {% endif %}
  207.                         <div class=\"media-body\">
  208.                             <h5 class=\"mt-0\">
  209.                                 <a href=\"{{ detailLink }}\" class=\"text-decoration-none text-dark\">
  210.                                     {{ news.title }}
  211.                                 </a>
  212.                             </h5>
  213.                             {{ news.shortText }}
  214.                         </div>
  215.                     </li>
  216.                 {% endfor %}
  217.             </ul>
  218.         </div>
  219.         <div class=\"pt-5\">
  220.             {% include 'includes/pagination.html.twig' %}
  221.         </div>
  222.     </div>
  223. {%  endblock %}
  224. ""news/listing.html.twig""/var/www/html/siteone/templates/news/listing.html.twig");
  225.     }
  226. }