Toevoegen subitems aan menu's en eenduidige structuur van hoofditems
This commit is contained in:
parent
0fb9dabfef
commit
706e8f4627
|
@ -6,6 +6,27 @@
|
||||||
url = "/organisatie/"
|
url = "/organisatie/"
|
||||||
weight = 10
|
weight = 10
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
identifier = "organisatie-doelstellingen"
|
||||||
|
name = "Doelstellingen"
|
||||||
|
url = "/organisatie/doelstellingen/"
|
||||||
|
parent = "organisatie"
|
||||||
|
weight = 11
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
identifier = "organisatie-bestuur"
|
||||||
|
name = "Bestuur"
|
||||||
|
url = "/organisatie/bestuur/"
|
||||||
|
parent = "organisatie"
|
||||||
|
weight = 12
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
identifier = "organisatie-commissies"
|
||||||
|
name = "Commissies"
|
||||||
|
url = "/organisatie/commissies/"
|
||||||
|
parent = "organisatie"
|
||||||
|
weight = 13
|
||||||
|
|
||||||
[[main]]
|
[[main]]
|
||||||
identifier = "evenementen"
|
identifier = "evenementen"
|
||||||
name = "Evenementen"
|
name = "Evenementen"
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
{{ $pages := (where $.Site.RegularPages ".Section" $sectionName) }}
|
{{ $pages := (where $.Site.RegularPages ".Section" $sectionName) }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ range $pages.ByParam "title" }}
|
{{ range $pages.ByParam "title" }}
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Title | default .Site.Params.textNoTitle }}</a></li>
|
<li>
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title | default .Site.Params.textNoTitle }}</a>
|
||||||
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
<ul class="menus menu">
|
<ul class="menus menu">
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
{{ if .Children }}
|
|
||||||
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
|
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
|
||||||
|
{{ if .Children }}
|
||||||
<li>
|
<li>
|
||||||
<button type="button" aria-haspopup="true" aria-expanded="true" aria-controls="dropdown{{ $.Scratch.Get "counter" }}">{{ .Name }}<span class="arrow"></span></button>
|
<button type="button" aria-haspopup="true" aria-expanded="true" aria-controls="dropdown{{ $.Scratch.Get "counter" }}"><a href="{{ .URL }}">{{ .Name }}</a><!-- <span class="arrow"></span>--></button>
|
||||||
<ul class="dropdown" id="dropdown{{ $.Scratch.Get "counter" }}">
|
<ul class="dropdown" id="dropdown{{ $.Scratch.Get "counter" }}">
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
|
<li><button type="button" aria-haspopup="true" aria-expanded="true" aria-controls="dropdown{{ $.Scratch.Get "counter" }}"><a href="{{ .URL }}">{{ .Name }}</a></button></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Reference in a new issue