pagination.tpl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% if pageCount > 1 %}
  2. <ul class="pagination">
  3. {% if first is defined and current != first %}
  4. <li class="first">
  5. <a href="{{ current_url }}&{{ pageParameterName ~ '=' ~first }}">&lt;&lt;
  6. </a>
  7. </li>
  8. {% endif %}
  9. {% if previous is defined %}
  10. <li class="previous">
  11. <a class="hidden-xs" href="{{ current_url }}&{{ pageParameterName ~ '=' ~previous }}">
  12. &lt;
  13. </a>
  14. </li>
  15. {% endif %}
  16. {% for page in pagesInRange %}
  17. {% if page != current %}
  18. <li class="page">
  19. <a href="{{ current_url }}&{{ pageParameterName ~ '=' ~page }}">{{ page }}</a>
  20. </li>
  21. {% else %}
  22. <li class="current active">
  23. <a>{{ page }} <span class="sr-only">(current)</span>
  24. </a>
  25. </li>
  26. {% endif %}
  27. {% endfor %}
  28. {% if next is defined %}
  29. <li class="next">
  30. <a class="hidden-xs" href="{{ current_url }}&{{ pageParameterName ~ '=' ~next }}">&gt;</a>
  31. </li>
  32. {% endif %}
  33. {% if last is defined and current != last %}
  34. <li class="last">
  35. <a href="{{ current_url }}&{{ pageParameterName ~ '=' ~last }}">&gt;&gt;</a>
  36. </li>
  37. {% endif %}
  38. </ul>
  39. {% endif %}