Inside single.html I render my content as asual. Furthermore I include partial for the sidenav with {{ partial "nav" . }}. Inside this partial I tried to call {{ .TableOfContent }} and {{ $.TableOfContent }} in order to show the toc for the current page. Nothing appeared.
With {{ .Title }} I can access the title of the current page’s title without problems, but this isn’t the case for the {{ .TableOfContent }}.
In conclusion: .Title and .TableOfContents should be in the same scope within single.html. But this doesn’t seem to be the case.
When calling nav.html inside of default/single.html with {{ partial "nav" . }} I’m passing all data from the current page to the template.
Edit: When calling {{ $.TableOfContents }} the terminal shows <$.TableOfContents>: TableOfContents is not a field of struct type *hugolib.Node in theme/partials/nav.html. So it seems that I call this variable from a node.
Edit 2: I’ve the function .IsNode which always true for nodes. I included in the nav.html and the returned value is false.