first version of the new website
[markerbeacon.git] / themes / markerbeacon / templates / translations.html
diff --git a/themes/markerbeacon/templates/translations.html b/themes/markerbeacon/templates/translations.html
new file mode 100644 (file)
index 0000000..1eec7c4
--- /dev/null
@@ -0,0 +1,16 @@
+{% macro translations_for(article) %}
+{% if article.translations %}
+Translations:
+    {% for translation in article.translations %}
+        <a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
+    {% endfor %}
+{% 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 %}