Just came across this limitation and I don’t see the reason why it would be this way.
This workaround is ok:
<a {{if eq $page.URL .URL}} class="active" {{end}}>Link to a single page / leaf bundle</a>
However, one can’t use .HasMenuCurrent to check whether a menu entry’s child is active and display accordingly.
The only solution for it to work that I’ve found is to not use a leaf bundle even if it won’t have children pages, just because it has a corresponding menu entry.
Is this the intended behavior? If so, shouldn’t we documment it somehow?
Why have single pages’ page objects have a .IsMenuCurrent method that does nothing?
The use-case I’m referring to is for a menu which contents don’t depend on the current page, and that maps the entire site’s structure(or to a certain depth).
Is this not the ideal approach for this requirement? If not, what would be better?