Browse Source

Stop footer richtext field escaping parent element

Edd Baldry 8 years ago
parent
commit
436b3b21a8

+ 1 - 1
bakerydemo/base/templatetags/navigation_tags.py

@@ -91,7 +91,7 @@ def breadcrumbs(context):
     }
 
 
-@register.inclusion_tag('base/include/footer.html', takes_context=True)
+@register.inclusion_tag('base/include/footer_text.html', takes_context=True)
 def get_footer_text(context):
     footer_text = ""
     if FooterText.objects.first() is not None:

+ 0 - 3
bakerydemo/templates/base/include/footer.html

@@ -1,3 +0,0 @@
-{% load wagtailcore_tags %}
-
-{{ footer_text|richtext }}

+ 5 - 0
bakerydemo/templates/base/include/footer_text.html

@@ -0,0 +1,5 @@
+{% load wagtailcore_tags %}
+
+<div class="copyright text-center text-muted" role="note">
+    {{ footer_text|richtext }}
+</div>

+ 1 - 1
bakerydemo/templates/includes/footer.html

@@ -29,7 +29,7 @@
                     </a>
                 </li>
             </ul>
-            <p class="copyright text-center text-muted">{% get_footer_text %}</p>
+            {% get_footer_text %}
         </div>
     </div>
 </div>