templates/common/pagination.html.twig line 1

Open in your IDE?
  1. {% if pageCount > 1 %}
  2.     <nav class="pagination">
  3.         {% set classAlign = (align is not defined) ? '' : align=='center' ? ' justify-content-center' : (align=='right' ? ' justify-content-end' : '') %}
  4.         {% set classSize = (size is not defined) ? '' : size=='large' ? ' pagination-lg' : (size=='small' ? ' pagination-sm' : '') %}
  5.         <ul>
  6.             {% if previous is defined %}
  7.                 <li>
  8.                     <a class="pagination-arrow" href="{{ path(route, query|merge({(pageParameterName): previous})) }}">
  9.                         <i class="icon-material-outline-keyboard-arrow-left"></i>
  10.                     </a>
  11.                 </li>
  12.             {% endif %}
  13.             {% if startPage > 1 %}
  14.                 <li>
  15.                     <a class="ripple-effect" href="{{ path(route, query|merge({(pageParameterName): 1})) }}">1</a>
  16.                 </li>
  17.                 {% if startPage == 3 %}
  18.                     <li>
  19.                         <a class="ripple-effect" href="{{ path(route, query|merge({(pageParameterName): 2})) }}">2</a>
  20.                     </li>
  21.                 {% elseif startPage != 2 %}
  22.                     <li class="">
  23.                         <span class="ripple-effect">&hellip;</span>
  24.                     </li>
  25.                 {% endif %}
  26.             {% endif %}
  27.             {% for page in pagesInRange %}
  28.                 {% if page != current %}
  29.                     <li>
  30.                         <a class="ripple-effect" href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
  31.                     </li>
  32.                 {% else %}
  33.                     <li>
  34.                         <a href="#" class="current-page ripple-effect">{{ page }}</a>
  35.                     </li>
  36.                 {% endif %}
  37.             {% endfor %}
  38.             {% if pageCount > endPage %}
  39.                 {% if pageCount > (endPage + 1) %}
  40.                     {% if pageCount > (endPage + 2) %}
  41.                         <li class="">
  42.                             <a class="ripple-effect" style="background: inherit; box-shadow: inherit">...</a>
  43.                         </li>
  44.                     {% else %}
  45.                         <li>
  46.                             <a class="ripple-effect" href="{{ path(route, query|merge({(pageParameterName): (pageCount - 1)})) }}">{{ pageCount -1 }}</a>
  47.                         </li>
  48.                     {% endif %}
  49.                 {% endif %}
  50.                 <li>
  51.                     <a class="ripple-effect" href="{{ path(route, query|merge({(pageParameterName): pageCount})) }}">{{ pageCount }}</a>
  52.                 </li>
  53.             {% endif %}
  54.             {% if next is defined %}
  55.                 <li>
  56.                     <a class="ripple-effect" rel="next" href="{{ path(route, query|merge({(pageParameterName): next})) }}">
  57.                         <i class="icon-material-outline-keyboard-arrow-right"></i>
  58.                     </a>
  59.                 </li>
  60.             {% endif %}
  61.         </ul>
  62.     </nav>
  63. {% endif %}