I’m using the Sections as my menu with SectionPagesMenu = "main"
in my header partial I have a navigation that is included in every page
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
...
<main class="{{ .Section }}">
This works as expected, until we get to the main tag. What I really want here is blog
or tutorials
or any other top level menu (section) items. I get this when I am in a piece of content (/blog/2016/10/10/my-post.md
), but not when I am at a list view (/blog
or /tutorials/
). Is there a way to get this?