forked from ag_kommunikation/webseite
add visible option for menu
This commit is contained in:
parent
af38935b88
commit
fa5bbc8b89
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user