Add tag list button to post list hero
This commit is contained in:
parent
0544f7541b
commit
a031adefda
2 changed files with 11 additions and 0 deletions
|
@ -43,6 +43,10 @@ class BlogPostListPage(BaseListingPage):
|
||||||
|
|
||||||
return BlogPostPageFeed
|
return BlogPostPageFeed
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def tag_list_page_url(self) -> Optional[str]:
|
||||||
|
return SingletonPageCache.get_url(BlogPostTagListPage)
|
||||||
|
|
||||||
|
|
||||||
class BlogPostPage(BaseContentPage):
|
class BlogPostPage(BaseContentPage):
|
||||||
subpage_types: list[Any] = []
|
subpage_types: list[Any] = []
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
{% extends "common/listing_page.html" %}
|
{% 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 %}
|
{% block post_content %}
|
||||||
<section class="container">
|
<section class="container">
|
||||||
{% for page in listing_pages %}
|
{% for page in listing_pages %}
|
||||||
|
|
Loading…
Reference in a new issue