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

add include if exists template tag for footer iframe

parent 33913760
{% load i18n %} {% load i18n %}
{% load include_maybe %}
<footer class="stickyfooter"> <footer class="stickyfooter">
<div> <div>
<div class="container"> <div class="container">
...@@ -12,9 +14,11 @@ ...@@ -12,9 +14,11 @@
</a> </a>
{% endfor %} {% endfor %}
Powered by <a href="http://djnro.grnet.gr/" target="_blank">DjNRO</a> v{{VERSION}} Powered by <a href="http://djnro.grnet.gr/" target="_blank">DjNRO</a> v{{VERSION}}
{% if "partial/bottom_iframe.html"|template_exists %}
<div class=""> <div class="">
{% include 'partial/bottom_iframe.html' %} {% include 'partial/bottom_iframe.html' %}
</div> </div>
{% endif %}
</div> </div>
</div> </div>
</footer> </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