bs_base-8.x-1.x-dev/templates/views/views-mini-pager.html.twig
templates/views/views-mini-pager.html.twig
{#
/**
* @file
* Theme override for a views mini-pager.
*
* Available variables:
* - items: List of pager items.
*
* @see template_preprocess_views_mini_pager()
*
* @ingroup themeable
*/
#}
{% if items.previous or items.next %}
{# Mini pager has special template processing and our views__pager that we
added in views template is lost. So we will add it here again.#}
<nav {{ attributes.addClass('views__pager') }} aria-label="{{ 'Pagination'|t }}">
<ul class="pagination js-pager__items">
{% if items.previous -%}
{% block items_previous %}
<li class="page-item">
<a class="page-link" href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}>
<span class="visually-hidden">{{ 'Previous page'|t }}</span>
<span aria-hidden="true">{{ items.previous.text|default('‹‹'|t) }}</span>
</a>
</li>
{% endblock %}
{%- endif %}
{% if items.current -%}
{% block items_current %}
<li class="page-item disabled">
<span class="page-link">
{% trans %}
Page {{ items.current }}
{% endtrans %}
</span>
</li>
{% endblock %}
{%- endif %}
{% if items.next %}
{% block items_next %}
<li class="page-item">
<a class="page-link" href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
<span class="visually-hidden">{{ 'Next page'|t }}</span>
<span aria-hidden="true">{{ items.next.text|default('››'|t) }}</span>
</a>
</li>
{% endblock %}
{% endif %}
</ul>
</nav>
{% endif %}
