{{/* Use this shortcode to display a list of controller versions that the document applies to Parameters: "first version" "last version" "product" First version can be a version number, e.g. "3.18", or "first" to use the lowest value in the array Last version can be a version number, e.g. "3.21", or "latest" to use the highest value in the array Product can be "ctrlvers" "apimvers" "adcvers" "nimvers" */}} {{ $start := string (.Get 0) }} {{ $end := string (.Get 1) }} {{ $product := string (.Get 2) }} {{ $temp := slice }} {{ $result := ""}} {{ $ver := slice }} {{ $prodname := ""}} {{ $istart := 0}} {{ $iend := 100}} {{if eq $product "apimvers" }} {{ $ver = $.Site.Params.apimvers }} {{ $prodname = "NGINX Controller API Management module" }} {{else if eq $product "adcvers" }} {{ $ver = $.Site.Params.adcvers }} {{ $prodname = "NGINX Controller App Delivery module" }} {{else if eq $product "nimvers" }} {{ $ver = $.Site.Params.nimvers }} {{ $prodname = "NGINX Instance Manager" }} {{else}} {{ $ver = $.Site.Params.ctrlvers }} {{ $prodname = "NGINX Controller" }} {{end}} {{if eq $start "first"}} {{$start = first 1 $ver}} {{end}} {{if eq $end "latest"}} {{$end = last 1 $ver}} {{end}} {{ $.Scratch.Set "counter" 0 }} {{ range $ver }} {{ $index := $.Scratch.Get "counter"}} {{ $current := index $ver $index}} {{if eq $current $start }} {{$istart = $index}} {{end}} {{if eq $current $end}} {{$iend = $index}} {{end}} {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }} {{ end }} {{ $temp = after $istart $ver }} {{ $iend = add (sub $iend $istart) 1 }} {{ $temp = first $iend $temp }} {{ $result = delimit $temp ", " " and " }}

This documentation applies to the following versions of {{$prodname}}: {{$result}}.