I am trying to create a ul
list of the sections of my hugo site and their child pages that have a specific param.
I basically want a multi-level ul menu at the side like so:
- Intro
- Page 1
- Page 2
- Section
- page 3
- page 4
Here is the Hugo Code I have so far:
<ul class="section-one-and-two-pages">
{{ range .Site.Pages }}
{{ range where ( where .Section "intro" ) or ".Params.type" "==" "article" }}
<li>{{.Permalink}}{{.Title}}</li>
{{end}}
{{ end }}
</ul>
At the top of my pages (.md) I am adding:
type: = "article"
However I cannot seem to get this to work. I keep getting the Error:
Error calling where: can't evaluate the array by no match argument or more than or equal to two arguments
When compiling. Any ideas?