{{- if or (eq .Kind "taxonomy") (eq .Kind "term") }} {{- $lastCapital := "" }} {{- $pages := slice }} {{- if eq .Kind "taxonomy" }} {{- $pages = partialCached "partials/pageHelper/taxonomyPages.html" . . }} {{- else if eq .Kind "term" }} {{- $pages = partialCached "partials/pageHelper/termPages.html" . . }} {{- end }} {{- $toc_pages := "" }} {{- range $pages }} {{- $capital := substr .Title 0 1 | upper }} {{- if ne $lastCapital $capital }} {{- $toc_pages = printf "%s