Add tag list button to post list hero

This commit is contained in:
Jake Howard 2022-10-29 13:22:21 +01:00
parent 0544f7541b
commit a031adefda
Signed by: jake
GPG Key ID: 57AFB45680EDD477
2 changed files with 11 additions and 0 deletions

View File

@ -43,6 +43,10 @@ class BlogPostListPage(BaseListingPage):
return BlogPostPageFeed
@cached_property
def tag_list_page_url(self) -> Optional[str]:
return SingletonPageCache.get_url(BlogPostTagListPage)
class BlogPostPage(BaseContentPage):
subpage_types: list[Any] = []

View File

@ -1,5 +1,12 @@
{% extends "common/listing_page.html" %}
{% load wagtailroutablepage_tags %}
{% block hero_buttons %}
<a class="button is-radiusless" href="{{ page.tag_list_page_url }}" title="View tags"><i class="fas fa-tags" aria-hidden="true"></i></a>
{{ block.super }}
{% endblock %}
{% block post_content %}
<section class="container">
{% for page in listing_pages %}