{{- $searchActive := or (hasPrefix .RelPermalink "/search") (hasPrefix .Path "/search") -}} {{- $currentCategory := "" -}} {{- if and (eq .Kind "term") (eq .Data.Taxonomy "category") -}} {{- $currentCategory = partial "slug.html" .Title -}} {{- else if .Params.category -}} {{- $currentCategory = partial "slug.html" (printf "%v" .Params.category) -}} {{- end -}}