templates/front/includes/front_pagination.html.twig line 1

Open in your IDE?
  1. {% if pageCount > 1 %}
  2.     <ul class="styled-pagination text-center clearfix">
  3.         {% if previous is defined %}
  4.             <li class="prev">
  5.                 <a href="{{ path(route, query|merge({(pageParameterName): previous})) }}"><span class="fa fa-angle-left"></span></a>
  6.             </li>
  7.         {% endif %}
  8.         {% if startPage > 1 %}
  9.             <li>
  10.                 <a href="{{ path(route, query|merge({(pageParameterName): 1})) }}">1</a>
  11.             </li>
  12.             {% if startPage == 3 %}
  13.                 <li>
  14.                     <a href="{{ path(route, query|merge({(pageParameterName): 2})) }}">2</a>
  15.                 </li>
  16.             {% elseif startPage != 2 %}
  17.                 <li class="disabled">
  18.                     <a href="#">&hellip;</a>
  19.                 </li>
  20.             {% endif %}
  21.         {% endif %}
  22.         {% for page in pagesInRange %}
  23.             {% if page != current %}
  24.                 <li>
  25.                     <a href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
  26.                 </li>
  27.             {% else %}
  28.                 <li class="current">
  29.                     <a href="#" class="active">{{ page }}</a>
  30.                 </li>
  31.             {% endif %}
  32.         {% endfor %}
  33.         {% if pageCount > endPage %}
  34.             {% if pageCount > (endPage + 1) %}
  35.                 {% if pageCount > (endPage + 2) %}
  36.                     <li class="disabled">
  37.                         <a href="#">&hellip;</a>
  38.                     </li>
  39.                 {% else %}
  40.                     <li>
  41.                         <a href="{{ path(route, query|merge({(pageParameterName): (pageCount - 1)})) }}">{{ pageCount -1 }}</a>
  42.                     </li>
  43.                 {% endif %}
  44.             {% endif %}
  45.             <li>
  46.                 <a href="{{ path(route, query|merge({(pageParameterName): pageCount})) }}">{{ pageCount }}</a>
  47.             </li>
  48.         {% endif %}
  49.         {% if next is defined %}
  50.             <li class="next">
  51.                 <a href="{{ path(route, query|merge({(pageParameterName): next})) }}"><span class="fa fa-angle-right"></span></a>
  52.             </li>
  53.         {% endif %}
  54.     </ul>
  55. {% endif %}