Added missing safe guard for hiding footer navigation

This commit is contained in:
squidfunk 2022-06-04 07:51:30 +02:00
parent 95f80479a2
commit e3bea56112
2 changed files with 6 additions and 2 deletions

View File

@ -3,7 +3,9 @@
-#} -#}
<footer class="md-footer"> <footer class="md-footer">
{% if page.previous_page or page.next_page %} {% if page.previous_page or page.next_page %}
{% set hidden = "hidden" if "footer" in page.meta.hide %} {% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "footer" in page.meta.hide %}
{% endif %}
<nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer.title') }}" {{ hidden }}> <nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer.title') }}" {{ hidden }}>
{% if page.previous_page %} {% if page.previous_page %}
{% set direction = lang.t("footer.previous") %} {% set direction = lang.t("footer.previous") %}

View File

@ -25,7 +25,9 @@
<!-- Link to previous and/or next page --> <!-- Link to previous and/or next page -->
{% if page.previous_page or page.next_page %} {% if page.previous_page or page.next_page %}
{% set hidden = "hidden" if "footer" in page.meta.hide %} {% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "footer" in page.meta.hide %}
{% endif %}
<nav <nav
class="md-footer__inner md-grid" class="md-footer__inner md-grid"
aria-label="{{ lang.t('footer.title') }}" aria-label="{{ lang.t('footer.title') }}"