Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

views-mini-pager.html.twig

Same filename in this branch
  1. 11.1.x core/profiles/demo_umami/themes/umami/templates/classy/views/views-mini-pager.html.twig
  2. 11.1.x core/themes/stable9/templates/views/views-mini-pager.html.twig
  3. 11.1.x core/themes/starterkit_theme/templates/views/views-mini-pager.html.twig
  4. 11.1.x core/themes/claro/templates/views/views-mini-pager.html.twig
  5. 11.1.x core/modules/views/templates/views-mini-pager.html.twig

Theme override for a views mini-pager.

Available variables:

  • heading_id: Pagination heading ID.
  • pagination_heading_level: The heading level to use for the pager.
  • items: List of pager items.

See also

template_preprocess_views_mini_pager()

File

core/themes/olivero/templates/views/views-mini-pager.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a views mini-pager.
  5. *
  6. * Available variables:
  7. * - heading_id: Pagination heading ID.
  8. * - pagination_heading_level: The heading level to use for the pager.
  9. * - items: List of pager items.
  10. *
  11. * @see template_preprocess_views_mini_pager()
  12. */
  13. #}
  14. {% if items.previous or items.next %}
  15. <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}">
  16. <{{ pagination_heading_level }} id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</{{ pagination_heading_level }}>
  17. <ul class="pager__items js-pager__items">
  18. {# Print previous item if we are not on the first page. #}
  19. {% if items.previous %}
  20. <li class="pager__item pager__item--control pager__item--previous">
  21. <a href="{{ items.previous.href }}" class="pager__link" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel', 'class') }}>
  22. <span class="visually-hidden">{{ 'Previous page'|t }}</span>
  23. {%- include "@olivero/../images/pager-previous.svg" -%}
  24. </a>
  25. </li>
  26. {% endif %}
  27. {# Print current active page. #}
  28. {% if items.current %}
  29. <li class="pager__item pager__item--active">
  30. {{ items.current }}
  31. </li>
  32. {% endif %}
  33. {# Print next item if we are not on the last page. #}
  34. {% if items.next %}
  35. <li class="pager__item pager__item--control pager__item--next">
  36. <a href="{{ items.next.href }}" class="pager__link" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
  37. <span class="visually-hidden">{{ 'Next page'|t }}</span>
  38. {%- include "@olivero/../images/pager-previous.svg" -%}
  39. </a>
  40. </li>
  41. {% endif %}
  42. </ul>
  43. </nav>
  44. {% endif %}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal