templates/bundles/Pagination/sliding.html.twig line 1

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