{{ $scratch := newScratch }} {{ $productPathData := findRE "[^/]+.*?" .RelPermalink }} {{ $product := index $productPathData 0 }} {{ $currentVersion := index $productPathData 1 }} {{ $doNotIncludeVersion := slice "resources" "platform" "example" }} {{ if or (eq $product nil) (in $doNotIncludeVersion $product) }} {{ else }} {{ $isOSS := gt (len (findRE `v[0-9]` $currentVersion)) 0 }} {{ $moreThanOneVersion := gt (len (index $.Site.Data.products $product).versions) 1 }} {{ if and $isOSS $moreThanOneVersion}} {{ end }} {{ end }}