diff --git a/pelican/themes/notmyidea/templates/article_infos.html b/pelican/themes/notmyidea/templates/article_infos.html index a1993a09..4b86716d 100644 --- a/pelican/themes/notmyidea/templates/article_infos.html +++ b/pelican/themes/notmyidea/templates/article_infos.html @@ -10,5 +10,6 @@ {% endif %}

In {{ article.category }}. {% if PDF_PROCESSOR %}get the pdf{% endif %}

{% include 'taglist.html' %} -{% include 'translations.html' %} +{% import 'translations.html' as translations with context %} +{{ translations.translations_for(article) }} diff --git a/pelican/themes/notmyidea/templates/page.html b/pelican/themes/notmyidea/templates/page.html index 9635fb8d..60409d5c 100644 --- a/pelican/themes/notmyidea/templates/page.html +++ b/pelican/themes/notmyidea/templates/page.html @@ -3,6 +3,8 @@ {% block content %}

{{ page.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} {% if PDF_PROCESSOR %}get the pdf{% endif %} {{ page.content }} diff --git a/pelican/themes/notmyidea/templates/translations.html b/pelican/themes/notmyidea/templates/translations.html index 0079883e..ca03a2c9 100644 --- a/pelican/themes/notmyidea/templates/translations.html +++ b/pelican/themes/notmyidea/templates/translations.html @@ -1,6 +1,8 @@ +{% macro translations_for(article) %} {% if article.translations %} Translations: {% for translation in article.translations %} {{ translation.lang }} {% endfor %} {% endif %} +{% endmacro %} diff --git a/pelican/themes/simple/templates/article.html b/pelican/themes/simple/templates/article.html index 16c34266..86b14f62 100644 --- a/pelican/themes/simple/templates/article.html +++ b/pelican/themes/simple/templates/article.html @@ -5,6 +5,8 @@

{{ article.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }}