templates/formation/custom_pagination.html.twig line 1

Open in your IDE?
  1. {# templates/pagination/custom_pagination.html.twig #}
  2. {% if pageCount > 1 %}
  3.     <ul class="pagination">
  4.         {% if previous is defined %}
  5.             <li class="page-item">
  6.                 <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): previous})) }}" rel="prev">
  7.                     <i class="zmdi zmdi-chevron-left"></i>
  8.                 </a>
  9.             </li>
  10.         {% else %}
  11.             <li class="page-item disabled">
  12.                 <span class="page-link"><i class="zmdi zmdi-chevron-left"></i></span>
  13.             </li>
  14.         {% endif %}
  15.         {% for page in pagesInRange %}
  16.             {% if page != current %}
  17.                 <li class="page-item">
  18.                     <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
  19.                 </li>
  20.             {% else %}
  21.                 <li class="page-item active">
  22.                     <span class="page-link">{{ page }}</span>
  23.                 </li>
  24.             {% endif %}
  25.         {% endfor %}
  26.         {% if next is defined %}
  27.             <li class="page-item">
  28.                 <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): next})) }}" rel="next">
  29.                     <i class="zmdi zmdi-chevron-right"></i>
  30.                 </a>
  31.             </li>
  32.         {% else %}
  33.             <li class="page-item disabled">
  34.                 <span class="page-link"><i class="zmdi zmdi-chevron-right"></i></span>
  35.             </li>
  36.         {% endif %}
  37.     </ul>
  38. {% endif %}