zola/test_site_i18n/templates/page.html
Philipp Oppermann 72373bea9b Add path to TranslatedContent (#863)
* Add path to `TranslatedContent`

This makes it possible to retrieve the translated page through the `get_page` function.

* Use TranslatedContent::path field in test_site_i18n

Use it with the `get_page` function to get a reference to the page object.
2020-02-02 17:48:43 -08:00

17 lines
No EOL
424 B
HTML

{{page.title}}
{{page.content | safe}}
Language: {{lang}}
{% for t in page.translations %}
Translated in {{t.lang|default(value=config.default_language)}}: {{t.title}} {{t.permalink|safe}}
<br><br>
{% set translated_page = get_page(path = t.path) %}
{{ translated_page.content | safe }}
{% endfor %}
{% for taxo_kind, items in page.taxonomies %}
{% set taxo = get_taxonomy(kind=taxo_kind, lang=lang) %}
{% endfor %}