Commit 363b2dbd authored by Kroustouris Stauros's avatar Kroustouris Stauros

add include if exists template tag for footer iframe

parent 33913760
{% load i18n %}
{% load include_maybe %}
<footer class="stickyfooter">
<div>
<div class="container">
......@@ -12,9 +14,11 @@
</a>
{% endfor %}
Powered by <a href="http://djnro.grnet.gr/" target="_blank">DjNRO</a> v{{VERSION}}
{% if "partial/bottom_iframe.html"|template_exists %}
<div class="">
{% include 'partial/bottom_iframe.html' %}
</div>
{% endif %}
</div>
</div>
</footer>
from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter
@stringfilter
def template_exists(value):
try:
template.loader.get_template(value)
return True
except template.TemplateDoesNotExist:
return False
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment