You can save the outer context in a variable:
{{ $outer := . }}
And then:
{{ if $outer.IsMenuCurrent ... }}
In your case you also would have to reorg. your partials a bit to get the correct context into the partial.
You can save the outer context in a variable:
{{ $outer := . }}
And then:
{{ if $outer.IsMenuCurrent ... }}
In your case you also would have to reorg. your partials a bit to get the correct context into the partial.