templates/site/pagination/sliding.html.twig line 1

Open in your IDE?
  1. {# default Sliding pagination control implementation #}
  2. {% if pageCount > 1 %}
  3. <nav class="mt-7">
  4.     <ul class="pagination justify-content-center">
  5.         {% if first is defined and current != first %}
  6.             <li class="page-item">
  7.                 <a href="{{ path(route, query|merge({(pageParameterName): first})) }}" class="page-link"><span class="fa fa-angle-double-left"></span></a>
  8.             </li>
  9.         {% endif %}
  10.         {% if previous is defined %}
  11.             <li class="page-item">
  12.                 <a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="page-link"><span class="fa fa-angle-left"></span></a>
  13.             </li>
  14.         {% endif %}
  15.         {% for page in pagesInRange %}
  16.             {% if page != current %}
  17.                 <li class="page-item">
  18.                     <a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="page-link">{{ page }}</a>
  19.                 </li>
  20.             {% else %}
  21.                 <li class="page-item active"><a class="page-link" href="#">{{ page }}</a></li>
  22.             {% endif %}
  23.         {% endfor %}
  24.         {% if next is defined %}
  25.             <li class="page-item">
  26.                 <a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="page-link"><span class="fa fa-angle-right"></span></a>
  27.             </li>
  28.         {% endif %}
  29.         {% if last is defined and current != last %}
  30.             <li class="page-item">
  31.                 <a href="{{ path(route, query|merge({(pageParameterName): last})) }}" class="page-link"><span class="fa fa-angle-double-right"></span></a>
  32.             </li>
  33.         {% endif %}
  34.     </ul>
  35. </nav>
  36. {% endif %}