{# Sub-template: pagination summary (e.g. "Showing 1–10 of 100 items") #} {# Props: firstItem, lastItem, totalItems, itemLabel #} {% with resolvedPage=currentPage|default:1 resolvedPageSize=pageSize|default:10 %} {% with previousPages=resolvedPage|add:"-1" %} {% widthratio previousPages 1 resolvedPageSize as computedOffset %} {% widthratio resolvedPage 1 resolvedPageSize as computedLast %}
Showing {% if firstItem %}{{ firstItem }}{% else %}{{ computedOffset|add:"1" }}{% endif %}–{% if lastItem %}{{ lastItem }}{% elif totalItems and computedLast > totalItems %}{{ totalItems }}{% else %}{{ computedLast }}{% endif %} of {{ totalItems }} {{ itemLabel }}
{% endwith %} {% endwith %}