You are here

calendar-pager.html.twig in Calendar 8

Same filename and directory in other branches
  1. 8.2 templates/calendar-pager.html.twig

Default theme implementation for a calendar pager.

Available variables:

  • items: List of pager items.

File

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