templates/Main/pagination_custom.html.twig line 1

Open in your IDE?
  1. {% if pageCount > 1 %}
  2.     <ul class="kode_pagination">
  3.     {% if previous is defined %}
  4.         <li><a class="prve" href="{{ path(route, query|merge({(pageParameterName): previous})) }}">{{ "masjid.pagination.prev"|trans }}<i class="fa fa-arrow-left"></i></a></li>
  5.     {% else %}
  6.         <li class="disabled">
  7.             <a class="prve"><i class="fa fa-arrow-left"></i>{{ "masjid.pagination.prev"|trans }}</a>
  8.         </li>
  9.     {% endif %}
  10.     {% if startPage > 1 %}
  11.         <li>
  12.             <a  href="{{ path(route, query|merge({(pageParameterName): 1})) }}">1</a>
  13.         </li>
  14.         {% if startPage == 3 %}
  15.         <li >
  16.             <a  href="{{ path(route, query|merge({(pageParameterName): 2})) }}">2</a>
  17.         </li>
  18.         {% elseif startPage != 2 %}
  19.         <li class="disabled">
  20.             <a>&hellip;</a>
  21.         </li>
  22.         {% endif %}
  23.     {% endif %}
  24.     {% for page in pagesInRange %}
  25.         {% if page != current %}
  26.             <li >
  27.                 <a  href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
  28.             </li>
  29.         {% else %}
  30.             <li class="active">
  31.                 <a >{{ page }}</a>
  32.             </li>
  33.         {% endif %}
  34.     {% endfor %}
  35.     {% if pageCount > endPage %}
  36.         {% if pageCount > (endPage + 1) %}
  37.             {% if pageCount > (endPage + 2) %}
  38.                 <li class="disabled">
  39.                     <a >&hellip;</a>
  40.                 </li>
  41.             {% else %}
  42.                 <li >
  43.                     <a  href="{{ path(route, query|merge({(pageParameterName): (pageCount - 1)})) }}">{{ pageCount -1 }}</a>
  44.                 </li>
  45.             {% endif %}
  46.         {% endif %}
  47.         <li >
  48.             <a  href="{{ path(route, query|merge({(pageParameterName): pageCount})) }}">{{ pageCount }}</a>
  49.         </li>
  50.     {% endif %}
  51.     {% if next is defined %}
  52.             <li><a class="next" href="{{ path(route, query|merge({(pageParameterName): next})) }}">{{ "masjid.pagination.next"|trans }}<i class="fa fa-arrow-right"></i></a></li>
  53.     {% else %}
  54.         <li class="disabled">
  55.             <a class="next">{{ "masjid.pagination.next"|trans }}<i class="fa fa-arrow-right"></i></a>
  56.         </li>
  57.     {% endif %}
  58.     </ul>
  59. {% endif %}