sito-hackit-22/themes/hackit0x16/templates/translations.html

19 lines
598 B
HTML
Raw Permalink Normal View History

2020-01-15 17:10:28 +01:00
{% macro translations_for(article) %}
{% if article.translations %}
<div class="translations-available">
Translations:
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
{% endfor %}
</div>
{% endif %}
{% endmacro %}
{% macro entry_hreflang(entry) %}
{% if entry.translations %}
{% for translation in entry.translations %}
<link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
{% endfor %}
{% endif %}
{% endmacro %}