{{ if $.Site.Params.versioning }}
{{ $original_version := printf "/%s/" .CurrentSection.Params.version }} {{ $latest_url := replace .Params.url .CurrentSection.Params.version .Site.Params.latest | relURL }} {{ $currentUrl := .Permalink }} {{ range .Site.Params.versions }} {{ $new_version := printf "/%s/" . }} {{ . }} {{ end }}
{{ else }} {{ .Site.Params.latest }} {{ end }}