var/cache/website/dev/twig/28/28a988b57e5b440743ff3e6546a39f61.php line 33

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. /* includes/blocks/newsSingleRelated.html.twig */
  14. class __TwigTemplate_cf9281be3cc3d7b636a498624b579a84 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->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/blocks/newsSingleRelated.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/blocks/newsSingleRelated.html.twig"));
  33.         // line 1
  34.         echo "<br><br>
  35. ";
  36.         // line 3
  37.         $context["previous"] = $this->env->getFunction('sulu_content_load')->getCallable()(twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "previousArticle", [], "any"falsefalsefalse3), ["title" => "title""url" => "url""image" => "image""date" => "date"]);
  38.         // line 4
  39.         $context["next"] = $this->env->getFunction('sulu_content_load')->getCallable()(twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "nextArticle", [], "any"falsefalsefalse4), ["title" => "title""url" => "url""image" => "image""date" => "date"]);
  40.         // line 5
  41.         echo "
  42. <div
  43.     class=\"grid sm:grid-cols-2 border divide-y sm:divide-y-0 divide-y-reverse sm:divide-x border-gray divide-gray text-blue mx-auto max-w-[928px]\">
  44.     ";
  45.         // line 10
  46.         echo "    <div
  47.       class=\"prev-news relative py-6 px-8 hover:bg-blue focus-within:bg-blue hover:text-white focus-within:text-white duration-300 order-1 sm:order-none\">
  48.       <a class=\"absolute inset-0 z-10 text-[0px] outline-none\"
  49.         href=\"";
  50.         // line 13
  51.         echo twig_escape_filter($this->env$this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["previous"] ?? null), "content", [], "any"falsefalsefalse13), "url", [], "any"falsefalsefalse13)), "html"nulltrue);
  52.         echo "\">
  53.         ";
  54.         // line 14
  55.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, ($context["content"] ?? null), "previousText", [], "any"falsefalsefalse14), "html"nulltrue);
  56.         echo "
  57.       </a>
  58.       <div class=\"flex items-center gap-[10px]\">
  59.         <svg class=\"w-6 h-2\">
  60.           <use xlink:href=\"#arrow-prev\"></use>
  61.         </svg>
  62.         <span>";
  63.         // line 20
  64.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, ($context["content"] ?? null), "previousText", [], "any"falsefalsefalse20), "html"nulltrue);
  65.         echo "</span>
  66.       </div>
  67.       <div class=\"flex gap-3 mt-3\">
  68.         <div class=\"w-20 h-20 flex-shrink-0\">
  69.           ";
  70.         // line 26
  71.         echo "          ";
  72.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["previous"] ?? null), "content", [], "any"falsefalsefalse26), "image", [], "any"falsefalsefalse26)) > 0)) {
  73.             // line 27
  74.             echo "          ";
  75.             $context["image"] = (($__internal_compile_0 twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["previous"] ?? null), "content", [], "any"falsefalsefalse27), "image", [], "any"falsefalsefalse27), "thumbnails", [], "any"falsefalsefalse27)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["100x100"] ?? null) : null);
  76.             // line 28
  77.             echo "          <img class=\"w-full h-full object-cover\"
  78.             src=\"";
  79.             // line 29
  80.             echo twig_escape_filter($this->env, ($context["image"] ?? null), "html"nulltrue);
  81.             echo "\"
  82.             alt=\"";
  83.             // line 30
  84.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["previous"] ?? null), "content", [], "any"falsefalsefalse30), "title", [], "any"falsefalsefalse30), "html"nulltrue);
  85.             echo "\"
  86.             loading=\"lazy\">
  87.           ";
  88.         }
  89.         // line 33
  90.         echo "        </div>
  91.         <div>
  92.           <p class=\"title text-xl\">";
  93.         // line 35
  94.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["previous"] ?? null), "content", [], "any"falsefalsefalse35), "title", [], "any"falsefalsefalse35), "html"nulltrue);
  95.         echo "</p>
  96.           <time class=\"block text-sm mt-3 whitespace-nowrap\">";
  97.         // line 36
  98.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["previous"] ?? null), "content", [], "any"falsefalsefalse36), "date", [], "any"falsefalsefalse36), "d M, Y"), "html"nulltrue);
  99.         echo "</time>
  100.         </div>
  101.       </div>
  102.     </div>
  103.  
  104.     ";
  105.         // line 42
  106.         echo "    <div
  107.       class=\"next-news relative py-6 px-8 hover:bg-blue focus-within:bg-blue hover:text-white focus-within:text-white duration-300\">
  108.       <a class=\"absolute inset-0 z-10 text-[0px] outline-none\"
  109.         href=\"";
  110.         // line 45
  111.         echo twig_escape_filter($this->env$this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["next"] ?? null), "content", [], "any"falsefalsefalse45), "url", [], "any"falsefalsefalse45)), "html"nulltrue);
  112.         echo "\">
  113.         ";
  114.         // line 46
  115.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, ($context["content"] ?? null), "nextText", [], "any"falsefalsefalse46), "html"nulltrue);
  116.         echo "
  117.       </a>
  118.       <div class=\"flex justify-end items-center gap-[10px]\">
  119.         <span>";
  120.         // line 49
  121.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, ($context["content"] ?? null), "nextText", [], "any"falsefalsefalse49), "html"nulltrue);
  122.         echo "</span>
  123.         <svg class=\"w-6 h-2\">
  124.           <use xlink:href=\"#arrow-next\"></use>
  125.         </svg>
  126.       </div>
  127.       <div class=\"flex gap-3 mt-3\">
  128.         <div>
  129.           <p class=\"title text-xl\">";
  130.         // line 57
  131.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["next"] ?? null), "content", [], "any"falsefalsefalse57), "title", [], "any"falsefalsefalse57), "html"nulltrue);
  132.         echo "</p>
  133.           <time class=\"block text-sm mt-3 whitespace-nowrap\">";
  134.         // line 58
  135.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["next"] ?? null), "content", [], "any"falsefalsefalse58), "date", [], "any"falsefalsefalse58), "d M, Y"), "html"nulltrue);
  136.         echo "</time>
  137.         </div>
  138.         <div class=\"w-20 h-20 flex-shrink-0\">
  139.           ";
  140.         // line 62
  141.         echo "          ";
  142.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["next"] ?? null), "content", [], "any"falsefalsefalse62), "image", [], "any"falsefalsefalse62)) > 0)) {
  143.             // line 63
  144.             echo "          ";
  145.             $context["image"] = (($__internal_compile_1 twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["next"] ?? null), "content", [], "any"falsefalsefalse63), "image", [], "any"falsefalsefalse63), "thumbnails", [], "any"falsefalsefalse63)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1["100x100"] ?? null) : null);
  146.             // line 64
  147.             echo "          <img class=\"w-full h-full object-cover\"
  148.             src=\"";
  149.             // line 65
  150.             echo twig_escape_filter($this->env, ($context["image"] ?? null), "html"nulltrue);
  151.             echo "\"
  152.             alt=\"";
  153.             // line 66
  154.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["next"] ?? null), "content", [], "any"falsefalsefalse66), "title", [], "any"falsefalsefalse66), "html"nulltrue);
  155.             echo "\"
  156.             loading=\"lazy\">
  157.           ";
  158.         }
  159.         // line 69
  160.         echo "        </div>
  161.       </div>
  162.     </div>";
  163.         
  164.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  165.         
  166.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  167.     }
  168.     public function getTemplateName()
  169.     {
  170.         return "includes/blocks/newsSingleRelated.html.twig";
  171.     }
  172.     public function isTraitable()
  173.     {
  174.         return false;
  175.     }
  176.     public function getDebugInfo()
  177.     {
  178.         return array (  173 => 69,  167 => 66,  163 => 65,  160 => 64,  157 => 63,  154 => 62,  148 => 58,  144 => 57,  133 => 49,  127 => 46,  123 => 45,  118 => 42,  110 => 36,  106 => 35,  102 => 33,  96 => 30,  92 => 29,  89 => 28,  86 => 27,  83 => 26,  75 => 20,  66 => 14,  62 => 13,  57 => 10,  51 => 5,  49 => 4,  47 => 3,  43 => 1,);
  179.     }
  180.     public function getSourceContext()
  181.     {
  182.         return new Source("<br><br>
  183. {% set previous = sulu_content_load(content.previousArticle, {'title': 'title', 'url': 'url', 'image': 'image', 'date': 'date'}) %}
  184. {% set next = sulu_content_load(content.nextArticle, {'title': 'title', 'url': 'url', 'image': 'image', 'date': 'date'}) %}
  185. <div
  186.     class=\"grid sm:grid-cols-2 border divide-y sm:divide-y-0 divide-y-reverse sm:divide-x border-gray divide-gray text-blue mx-auto max-w-[928px]\">
  187.     {# Prev #}
  188.     <div
  189.       class=\"prev-news relative py-6 px-8 hover:bg-blue focus-within:bg-blue hover:text-white focus-within:text-white duration-300 order-1 sm:order-none\">
  190.       <a class=\"absolute inset-0 z-10 text-[0px] outline-none\"
  191.         href=\"{{ sulu_content_path(previous.content.url) }}\">
  192.         {{ content.previousText }}
  193.       </a>
  194.       <div class=\"flex items-center gap-[10px]\">
  195.         <svg class=\"w-6 h-2\">
  196.           <use xlink:href=\"#arrow-prev\"></use>
  197.         </svg>
  198.         <span>{{ content.previousText }}</span>
  199.       </div>
  200.       <div class=\"flex gap-3 mt-3\">
  201.         <div class=\"w-20 h-20 flex-shrink-0\">
  202.           {# Image size 100*100 #}
  203.           {% if previous.content.image|length > 0 %}
  204.           {% set image = previous.content.image.thumbnails['100x100'] %}
  205.           <img class=\"w-full h-full object-cover\"
  206.             src=\"{{ image }}\"
  207.             alt=\"{{ previous.content.title }}\"
  208.             loading=\"lazy\">
  209.           {% endif %}
  210.         </div>
  211.         <div>
  212.           <p class=\"title text-xl\">{{ previous.content.title }}</p>
  213.           <time class=\"block text-sm mt-3 whitespace-nowrap\">{{ previous.content.date|date('d M, Y') }}</time>
  214.         </div>
  215.       </div>
  216.     </div>
  217.  
  218.     {# Next #}
  219.     <div
  220.       class=\"next-news relative py-6 px-8 hover:bg-blue focus-within:bg-blue hover:text-white focus-within:text-white duration-300\">
  221.       <a class=\"absolute inset-0 z-10 text-[0px] outline-none\"
  222.         href=\"{{ sulu_content_path(next.content.url) }}\">
  223.         {{ content.nextText }}
  224.       </a>
  225.       <div class=\"flex justify-end items-center gap-[10px]\">
  226.         <span>{{ content.nextText }}</span>
  227.         <svg class=\"w-6 h-2\">
  228.           <use xlink:href=\"#arrow-next\"></use>
  229.         </svg>
  230.       </div>
  231.       <div class=\"flex gap-3 mt-3\">
  232.         <div>
  233.           <p class=\"title text-xl\">{{ next.content.title }}</p>
  234.           <time class=\"block text-sm mt-3 whitespace-nowrap\">{{ next.content.date|date('d M, Y') }}</time>
  235.         </div>
  236.         <div class=\"w-20 h-20 flex-shrink-0\">
  237.           {# Image size 100*100 #}
  238.           {% if next.content.image|length > 0 %}
  239.           {% set image = next.content.image.thumbnails['100x100'] %}
  240.           <img class=\"w-full h-full object-cover\"
  241.             src=\"{{ image }}\"
  242.             alt=\"{{ next.content.title }}\"
  243.             loading=\"lazy\">
  244.           {% endif %}
  245.         </div>
  246.       </div>
  247.     </div>""includes/blocks/newsSingleRelated.html.twig""/home/clients/27e4eb6afe64c67f100a17cbd6809e7c/var/www/oakas-lane/templates/includes/blocks/newsSingleRelated.html.twig");
  248.     }
  249. }