sito-hackit-18/themes/hackit0x15/templates/includes/translations.html

19 lines
569 B
HTML
Raw Normal View History

2018-06-04 19:11:32 +02:00
{% macro translations_for(article, label=True) %}
2018-04-12 19:17:29 +02:00
{% if article.translations %}
2018-06-04 19:11:32 +02:00
{% if label %}
<span class="label label-default">Lang</span>
{% endif %}
2018-04-12 19:17:29 +02:00
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}
2018-06-04 19:11:32 +02:00
{% endmacro %}
{% macro translations_li(article) %}
{% if article.translations %}
{% for translation in article.translations %}
<li><a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a></li>
{% endfor %}
{% endif %}
{% endmacro %}