add visible option for menu

This commit is contained in:
L3D 2021-02-18 19:19:38 +01:00
parent af38935b88
commit fa5bbc8b89
No known key found for this signature in database
GPG Key ID: CD08445BFF4313D1
3 changed files with 18 additions and 8 deletions

View File

@ -1,7 +1,11 @@
{
"Leistungen": {
"href": "/leistungen",
"items": {}
"list_childs": true,
"items": {
"Kunden": "/kunden",
"Partner": "/partner"
}
},
"Mitglieder": {
"href": "/mitglieder",
@ -11,16 +15,18 @@
"Charta": "/mitglieder/charta"
}
},
"Kunden": {
"href": "/kunden",
"items": {}
},
"Partner": {
"href": "/partner",
"Aktuelles": {
"href": "/blog",
"visible": false,
"list_childs": true,
"items": {}
},
"Kontakt": {
"href": "/kontakt",
"items": {}
"list_childs": true,
"items": {
"Impressum": "/impressum",
"Datenschutz": "/datenschutz"
}
}
}

View File

@ -32,6 +32,7 @@
<ul class="primary_nav__navlist">
{% for title, mapping in bag("navigation").items() %}
{% if mapping.visible|default(true) %}
<li class="primary_nav__navitem
{%- if this._path == mapping.href or mapping.href != '/' and this.is_child_of(mapping.href) %}
-active
@ -56,6 +57,7 @@
</ul>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
</nav>

View File

@ -36,6 +36,7 @@
<ul class="primary_nav__navlist">
{% for title, mapping in bag("navigation").items() %}
{% if mapping.visible|default(true) %}
<li class="primary_nav__navitem
{%- if this._path == mapping.href or mapping.href != '/' and this.is_child_of(mapping.href) %}
-active
@ -60,6 +61,7 @@
</ul>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
</nav>