From 5d7d84249b7c18b9a1a4645a8a5e9e75770d5d5a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 22 Oct 2023 15:56:33 +0100 Subject: [PATCH] Show pagination stats in listing hero --- website/common/templates/common/listing_page.html | 6 ++++++ website/common/templates/wagtail_base.html | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/website/common/templates/common/listing_page.html b/website/common/templates/common/listing_page.html index 6f95a09..9c40506 100644 --- a/website/common/templates/common/listing_page.html +++ b/website/common/templates/common/listing_page.html @@ -12,6 +12,12 @@ {{ block.super }} {% endblock %} +{% block content_details %} + {{ block.super }} + + {% if listing_pages.has_other_pages %}

Showing {{ listing_pages.start_index }}—{{ listing_pages.end_index }} of {{ listing_pages.paginator.count }}.

{% endif %} +{% endblock %} + {% block post_content %}
{% for page in listing_pages %} diff --git a/website/common/templates/wagtail_base.html b/website/common/templates/wagtail_base.html index c298ee5..9dfb407 100644 --- a/website/common/templates/wagtail_base.html +++ b/website/common/templates/wagtail_base.html @@ -34,7 +34,9 @@

{{ page.hero_title }}

{% if page.subtitle %}

{{ page.subtitle|richtext }}

{% endif %} - {% include "common/content-details.html" %} + {% block content_details %} + {% include "common/content-details.html" %} + {% endblock %}