Hello everyone,
I have a problem once again and i couldn’t figure it out myself
maybe its just me but i think the docs are sometimes quiet hard to understand^^
So now my problem.
Im trying to create a navbar based on frontmatter and the folder structure.
Thats my navbar code:
{{ range $.Site.Pages }} {{ if .Params.navbar }} {{ if .Params.dropdown }} <div class="dropdown"> <li class="navbtn"><a href="{{ .URL }}/">{{ .Name }}</a></li> <div class="dropdown-content"> {{ range .Params.dropdown }} <div class="col-md-6"> <h1>{{.}}</h1> {{ $scope := .}} {{ range where $.Pages "Section" "{{.}}" }} {{ if .Params.clickable }} <a href="{{$scope.RelPermalink}}">{{$scope.Params.title}}</a> {{ else }} <a href="#">{{$scope.Params.title}}</a> {{ end }} {{ end }} </div> {{ end }} </div> </div> {{ else }} <li class="navbtn"><a href="{{ .URL }}/">{{ .Name }}</a></li> {{ end }} {{ end }} {{ end }}
My problem is that it doesn’t show an error but also doesn’t show anything after
{{ range where $.Pages “Section” “{{.}}” }}
I already tried it without the {{ $scope := .}} and it didn’t make a difference.
Thank in advance
also i have no idea how to format code here^^