{{ i18n "toc" }} {{ $currentLink := .RelPermalink }} {{ range last 1 (where .Ancestors "Params.categories" "intersect" (slice "book") ) }} {{ .Title }} {{ partial "toc.html" (dict "content" . "currentLink" $currentLink) }} {{ end }}