Toevoegen subitems aan menu's en eenduidige structuur van hoofditems
This commit is contained in:
		
							parent
							
								
									0fb9dabfef
								
							
						
					
					
						commit
						706e8f4627
					
				
					 3 changed files with 27 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -6,6 +6,27 @@
 | 
			
		|||
    url = "/organisatie/"
 | 
			
		||||
    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]]
 | 
			
		||||
    identifier = "evenementen"
 | 
			
		||||
    name = "Evenementen"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,9 @@
 | 
			
		|||
    {{ $pages := (where $.Site.RegularPages ".Section" $sectionName) }}
 | 
			
		||||
    <ul>
 | 
			
		||||
    {{ 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 }}
 | 
			
		||||
    </ul>
 | 
			
		||||
{{ end }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,10 +14,10 @@
 | 
			
		|||
       <ul class="menus menu">
 | 
			
		||||
           {{ $currentPage := . }}
 | 
			
		||||
           {{ range .Site.Menus.main }}
 | 
			
		||||
             {{ if .Children }}
 | 
			
		||||
               {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
 | 
			
		||||
             {{ if .Children }}
 | 
			
		||||
               <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" }}">
 | 
			
		||||
                   {{ range .Children }}
 | 
			
		||||
                     <li><a href="{{ .URL }}">{{ .Name }}</a></li>
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +25,7 @@
 | 
			
		|||
                 </ul>
 | 
			
		||||
               </li>
 | 
			
		||||
             {{ 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 }}
 | 
			
		||||
         </ul>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue