mirror of
https://github.com/getzola/zola
synced 2024-12-15 06:42:29 +00:00
72373bea9b
* 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.
17 lines
No EOL
424 B
HTML
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 %} |