From 0f5522eadfe8061d4cfbb7389d5f6ad3531f5907 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 17 Dec 2019 19:53:41 -0600 Subject: [PATCH] Custom breadcrumbs for webcast pages, fixes #146 --- .../templates/events/tags/breadcrumbs.html | 22 +++++++++++++++++++ .../templates/events/webcast_index_page.html | 15 ++++++++++++- .../events/templates/events/webcast_page.html | 15 ++++++++++++- .../home/templatetags/navigation_tags.py | 5 +++++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 project_tier/events/templates/events/tags/breadcrumbs.html diff --git a/project_tier/events/templates/events/tags/breadcrumbs.html b/project_tier/events/templates/events/tags/breadcrumbs.html new file mode 100644 index 00000000..c829879a --- /dev/null +++ b/project_tier/events/templates/events/tags/breadcrumbs.html @@ -0,0 +1,22 @@ +{% load wagtailcore_tags %} + +{% if ancestors %} + +{% endif %} diff --git a/project_tier/events/templates/events/webcast_index_page.html b/project_tier/events/templates/events/webcast_index_page.html index 50554114..89aa082c 100644 --- a/project_tier/events/templates/events/webcast_index_page.html +++ b/project_tier/events/templates/events/webcast_index_page.html @@ -1,5 +1,18 @@ {% extends "standard_sidebar_layout.html" %} -{% load wagtailcore_tags wagtailimages_tags %} +{% load wagtailcore_tags wagtailimages_tags navigation_tags %} + +{% block page_banner %} + +{% endblock %} {% block sidebar %}
diff --git a/project_tier/events/templates/events/webcast_page.html b/project_tier/events/templates/events/webcast_page.html index c5b5b568..193ea1b4 100644 --- a/project_tier/events/templates/events/webcast_page.html +++ b/project_tier/events/templates/events/webcast_page.html @@ -1,5 +1,18 @@ {% extends "standard_sidebar_layout.html" %} -{% load wagtailcore_tags wagtailimages_tags %} +{% load wagtailcore_tags wagtailimages_tags navigation_tags %} + +{% block page_banner %} + +{% endblock %} {% block sidebar %}
diff --git a/project_tier/home/templatetags/navigation_tags.py b/project_tier/home/templatetags/navigation_tags.py index ede8f9cd..2789545f 100644 --- a/project_tier/home/templatetags/navigation_tags.py +++ b/project_tier/home/templatetags/navigation_tags.py @@ -128,6 +128,11 @@ def breadcrumbs(context): } +@register.inclusion_tag('events/tags/breadcrumbs.html', takes_context=True) +def webcast_breadcrumbs(context): + return breadcrumbs(context) + + @register.inclusion_tag('tags/standard_index_listing.html', takes_context=True) def standard_index_listing(context, calling_page): pages = calling_page.get_children().live().specific()