|
@@ -1,7 +1,7 @@
|
|
|
from django import template
|
|
|
-from django.template import Template
|
|
|
-from django.utils.http import urlencode
|
|
|
from wagtail.wagtailcore.models import Page
|
|
|
+from bakerydemo.base.models import FooterText
|
|
|
+
|
|
|
|
|
|
register = template.Library()
|
|
|
# https://docs.djangoproject.com/en/1.9/howto/custom-template-tags/
|
|
@@ -87,3 +87,12 @@ def breadcrumbs(context):
|
|
|
'ancestors': ancestors,
|
|
|
'request': context['request'],
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+@register.inclusion_tag('base/include/footer.html', takes_context=True)
|
|
|
+def get_footer_text(context):
|
|
|
+ footer_text = FooterText.objects.first().body
|
|
|
+
|
|
|
+ return {
|
|
|
+ 'footer_text': footer_text,
|
|
|
+ }
|