Hello,
I’m abusing the pre
and post
values of menu items to create “sections” in a drop down menu. I’m trying to implement this for the Hugo universal theme based on the upstream boostrap version:
http://universal.ondrejsvestka.cz/1-0/index.html
See the menu items “Features” or “Portfolio”.
I’m setting the post
value to a the column number where the menu items need to end up in, e.g.
[[menu.main]]
name = "Portfolio"
identifier = "section.portfolio"
url = ""
weight = 1
parent = "menu.portfolio"
post = 1
[[menu.main]]
name = "About"
identifier = "section.about"
url = ""
weight = 2
parent = "menu.portfolio"
post = 2
In my template, I want to filter the children of the top level menu item based on this post
value:
{{ range where .Children "Post" "==" "1" }}
...
{{ end }}
But my collection always returns empty. I tried the following variants, but to no avail:
{{ range where .Children "Post" "1" }}
{{ range where .Children "Post" "=" "1" }}
{{ range where .Children "Post" "==" "1" }}
{{ range where .Children "Post" "eq" "1" }}
What am I doing wrong?
Ringo