You are here

views-mini-pager.html.twig in Zircon Profile 8

Default theme implementation for a views mini-pager.

Available variables:

  • items: List of pager items.

File

core/modules/views/templates/views-mini-pager.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a views mini-pager.
  5. *
  6. * Available variables:
  7. * - items: List of pager items.
  8. *
  9. * @see template_preprocess_views_mini_pager()
  10. *
  11. * @ingroup themeable
  12. */
  13. #}
  14. {% if items.previous or items.next %}
  15. <nav role="navigation" aria-labelledby="pagination-heading">
  16. <h4 class="visually-hidden">{{ 'Pagination'|t }}</h4>
  17. <ul class="js-pager__items">
  18. {% if items.previous %}
  19. <li>
  20. <a href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}>
  21. <span class="visually-hidden">{{ 'Previous page'|t }}</span>
  22. <span aria-hidden="true">{{ items.previous.text|default('‹‹'|t) }}</span>
  23. </a>
  24. </li>
  25. {% endif %}
  26. {% if items.current %}
  27. <li>
  28. {% trans %}
  29. Page {{ items.current }}
  30. {% endtrans %}
  31. </li>
  32. {% endif %}
  33. {% if items.next %}
  34. <li>
  35. <a href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
  36. <span class="visually-hidden">{{ 'Next page'|t }}</span>
  37. <span aria-hidden="true">{{ items.next.text|default('››'|t) }}</span>
  38. </a>
  39. </li>
  40. {% endif %}
  41. </ul>
  42. </nav>
  43. {% endif %}

Related topics