templates/default/knp_pagination.html.twig line 1

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