Current navigation

Greetings!

I’m new to Hugo and I’m currently building my small company website. I have the exact problem as described here by Brad and I’d like very much to share fix you mentioned with us.

I also have main menu (named portal) defined in config, consisting of mostly static pages without archetype. For those pages I can not get highlighted menu. My code is here:

{{ range .Site.Menus.portal }}
                        <li><a href="{{ .Url }}" {{ if $currentNode.IsMenuCurrent "portal" . }}class="active-page"{{ end }}>{{ .Name }}</a></li>
{{ end }}

Highlight gets properly displayed only for blog, which also does not have any special archetype (for now), but it’s root page ( / ).

So, please, help and thanks in advance!