Back to Istio Io

Tab

layouts/shortcodes/tab.html

latest494 B
Original Source

{{- if .Parent -}} {{- $name := trim (.Get "name") " " -}} {{- $category_value := trim (.Get "category-value") " " -}} {{- if not (.Parent.Scratch.Get "tabs") -}} {{- .Parent.Scratch.Set "tabs" slice -}} {{- end -}} {{ $tab_description := .Get "description" }} {{- $.Parent.Scratch.Add "tabs" (dict "name" $name "category_value" $category_value "content" .Inner "description" $tab_description) -}} {{- else -}} {{- errorf "Missing surrounding tabset for tab (%s)" .Position -}} {{- end -}}