Allow to override menu (block menu)

This commit is contained in:
southerntofu 2022-02-23 20:31:21 +01:00
parent e9a1bf2544
commit 01448150f6
1 changed files with 2 additions and 4 deletions

View File

@ -16,7 +16,6 @@
<header>
{% block header %}
{# TAXONOMY PROBLEM (not needed with Zola > 10.1) need to check if lang exists, do not display anything otherwise #}
{% if lang %}
{% if config.extra.header and config.extra.header != "disabled" %}{# TAXONOMY: no lang here #}
{% set header = get_page(path=widgets::i18n_path(path=config.extra.header)) %}
{{ header.content | markdown | safe }}
@ -25,14 +24,13 @@
<h2>Please edit config.extra.header, or override the header block in your site templates.</h2>
{% endif %}
{% if translations %}{{ widgets::translations(translations=translations) }}{% endif %}
{% block menu %}
{% if config.extra.menu and config.extra.menu != "disabled" %}
{{ widgets::menu(path=config.extra.menu) }}
{% elif config.extra.menu != "disabled" %}
<h2>Point config.extra.menu to a Markdown page and you will have a navigation menu</h2>
{% endif %}
{% else %}
<h3>Your zola version does not support translations in taxonomy templates. Please upgrade.</h3>
{% endif %}
{% endblock menu %}
{% endblock header %}
</header>
<main{% if config.extra.max_width_for == "main" %} style="max-width: {{ config.extra.max_width }}"{% endif %}>