var/cache/website/dev/twig/aa/aa44517185cd0154196a209550ddac0b.php line 94

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. /* ./partials/layout/pagination.html.twig */
  14. class __TwigTemplate_8aeb1b1b34bda908ee9477c62c772cb1 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""./partials/layout/pagination.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""./partials/layout/pagination.html.twig"));
  33.         // line 46
  34.         echo "
  35. ";
  36.         // line 49
  37.         if ((($context["nbrPages"] ?? null) > 1)) {
  38.             // line 50
  39.             echo "
  40.     <ul class=\"pagination ";
  41.             // line 51
  42.             echo twig_escape_filter($this->env, ($context["class"] ?? null), "html"nulltrue);
  43.             echo "\">
  44.     ";
  45.             // line 52
  46.             $context["active_page"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (($__internal_compile_0 twig_get_attribute($this->env$this->source, ($context["view"] ?? null), "blocks", [], "any"falsefalsefalse52)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[(($context["index"] ?? null) - 1)] ?? null) : null), "projects", [], "any"falsefalsefalse52), "page", [], "any"falsefalsefalse52);
  47.             // line 53
  48.             echo "
  49.         ";
  50.             // line 54
  51.             if (((($context["active_page"] ?? null) - 1) >= 1)) {
  52.                 // line 55
  53.                 echo "          <li class=\"pagination-prev pagination-item\" title=\"Previous page\">
  54.             <a href=\"";
  55.                 // line 56
  56.                 echo twig_escape_filter($this->env$this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "url", [], "any"falsefalsefalse56)), "html"nulltrue);
  57.                 echo "?p=";
  58.                 echo twig_escape_filter($this->env, (($context["active_page"] ?? null) - 1), "html"nulltrue);
  59.                 echo "\">
  60.               <svg>
  61.                 <use xlink:href=\"#arrow-prev\"></use>
  62.               </svg>
  63.               ";
  64.                 // line 60
  65.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Previous page"), "html"nulltrue);
  66.                 echo "
  67.             </a>
  68.           </li>
  69.         ";
  70.             }
  71.             // line 64
  72.             echo "        
  73.         
  74.         ";
  75.             // line 66
  76.             $context['_parent'] = $context;
  77.             $context['_seq'] = twig_ensure_traversable(range(1, ($context["nbrPages"] ?? null)));
  78.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  79.                 // line 67
  80.                 echo "          <li class=\"pagination-item\">
  81.             <a class=\"\" href=\"";
  82.                 // line 68
  83.                 echo twig_escape_filter($this->env$this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "url", [], "any"falsefalsefalse68)), "html"nulltrue);
  84.                 echo "?p=";
  85.                 echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  86.                 echo "\">
  87.               ";
  88.                 // line 69
  89.                 echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  90.                 echo "
  91.             </a>
  92.           </li>
  93.         ";
  94.             }
  95.             $_parent $context['_parent'];
  96.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  97.             $context array_intersect_key($context$_parent) + $_parent;
  98.             // line 73
  99.             echo "       
  100.  
  101.         ";
  102.             // line 75
  103.             if ((($context["nbrPages"] ?? null) >= (($context["active_page"] ?? null) + 1))) {
  104.                 // line 76
  105.                 echo "          <li class=\"pagination-next pagination-item\" title=\"Next page\">
  106.             <a href=\"";
  107.                 // line 77
  108.                 echo twig_escape_filter($this->env$this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "url", [], "any"falsefalsefalse77)), "html"nulltrue);
  109.                 echo "?p=";
  110.                 echo twig_escape_filter($this->env, (($context["active_page"] ?? null) + 1), "html"nulltrue);
  111.                 echo "\">
  112.               ";
  113.                 // line 78
  114.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Next page"), "html"nulltrue);
  115.                 echo "
  116.               <svg>
  117.                 <use xlink:href=\"#arrow-next\"></use>
  118.               </svg>
  119.             </a>
  120.           </li>
  121.         ";
  122.             }
  123.             // line 85
  124.             echo "
  125.     </ul>
  126. ";
  127.         }
  128.         
  129.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  130.         
  131.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  132.     }
  133.     public function getTemplateName()
  134.     {
  135.         return "./partials/layout/pagination.html.twig";
  136.     }
  137.     public function isTraitable()
  138.     {
  139.         return false;
  140.     }
  141.     public function getDebugInfo()
  142.     {
  143.         return array (  135 => 85,  125 => 78,  119 => 77,  116 => 76,  114 => 75,  110 => 73,  100 => 69,  94 => 68,  91 => 67,  87 => 66,  83 => 64,  76 => 60,  67 => 56,  64 => 55,  62 => 54,  59 => 53,  57 => 52,  53 => 51,  50 => 50,  48 => 49,  43 => 46,);
  144.     }
  145.     public function getSourceContext()
  146.     {
  147.         return new Source("{# <ul class=\"pagination {{class}}\">
  148.   <li class=\"pagination-prev\" title=\"Previous page\">
  149.     <svg>
  150.       <use xlink:href=\"#arrow-prev\"></use>
  151.     </svg>
  152.           Previous page
  153.         </li>
  154.   
  155.   {% if pagination | length > 5 %}
  156.     {% for page in pagination | slice(0, 3) %}
  157.       <li class=\"pagination-item\">
  158.         <a class=\"\" href=\"{{page.link}}\">
  159.           {{page.text}}
  160.         </a>
  161.       </li>
  162.     {% endfor %}
  163.     <li class=\"pagination-dots\">
  164.             ...
  165.           </li>
  166.     <li class=\"pagination-item\">
  167.       <a class=\"\" href=\"{{pagination|last.link}}\">
  168.         {{pagination|last.text}}
  169.       </a>
  170.     </li>
  171.   {% else %}
  172.     {% for page in pagination %}
  173.       <li class=\"pagination-item\">
  174.         <a class=\"\" href=\"{{page.link}}\">
  175.           {{page.text}}
  176.         </a>
  177.       </li>
  178.     {% endfor %}
  179.   {% endif %}
  180.   <li class=\"pagination-next\" title=\"Next page\">
  181.           Next page
  182.           <svg>
  183.       <use xlink:href=\"#arrow-next\"></use>
  184.     </svg>
  185.   </li>
  186. </ul> #}
  187. {% if nbrPages  > 1 %}
  188.     <ul class=\"pagination {{class}}\">
  189.     {% set active_page = view.blocks[index-1].projects.page %}
  190.         {% if active_page - 1 >= 1 %}
  191.           <li class=\"pagination-prev pagination-item\" title=\"Previous page\">
  192.             <a href=\"{{ sulu_content_path(content.url) }}?p={{ active_page - 1 }}\">
  193.               <svg>
  194.                 <use xlink:href=\"#arrow-prev\"></use>
  195.               </svg>
  196.               {{ \"Previous page\" | trans }}
  197.             </a>
  198.           </li>
  199.         {% endif %}
  200.         
  201.         
  202.         {% for i in range(1, nbrPages) %}
  203.           <li class=\"pagination-item\">
  204.             <a class=\"\" href=\"{{ sulu_content_path(content.url) }}?p={{ i }}\">
  205.               {{ i }}
  206.             </a>
  207.           </li>
  208.         {% endfor %}
  209.        
  210.  
  211.         {% if nbrPages >= active_page + 1 %}
  212.           <li class=\"pagination-next pagination-item\" title=\"Next page\">
  213.             <a href=\"{{ sulu_content_path(content.url) }}?p={{ active_page + 1 }}\">
  214.               {{ \"Next page\" | trans }}
  215.               <svg>
  216.                 <use xlink:href=\"#arrow-next\"></use>
  217.               </svg>
  218.             </a>
  219.           </li>
  220.         {% endif %}
  221.     </ul>
  222. {% endif %}""./partials/layout/pagination.html.twig""/home/clients/27e4eb6afe64c67f100a17cbd6809e7c/var/www/oakas-lane/templates/partials/layout/pagination.html.twig");
  223.     }
  224. }