{{- $versions := partialCached "_relearn/siteVersions.gotmpl" .page }}
{{- if $versions }}
  {{- $pageVersion := site.Params.version | default "" }}
  {{- $icon := .element.icon | default "code-branch" }}
  {{- if and $icon (not (findRE ".*?\\bfa-\\w.*?" $icon)) }}
    {{- $icon = printf "fa-fw fas fa-%s" $icon }}
  {{- end }}
            <li class="R-versionswitcher">
              <div class="padding menu-control">
                <i class="{{ $icon }}"></i>
                <span>&nbsp;</span>
                <div class="control-style">
                  <label class="a11y-only" for="R-select-version">{{ T "Version" }}</label>
                  <select id="R-select-version">
                    {{- range $versions }}
                    <option id="R-select-version-{{ .identifier | anchorize }}" value="{{ .identifier | anchorize }}" data-identifier="{{ .identifier }}" data-abs="{{ .isAbs }}" data-uri="{{ .baseURL }}"{{ if eq $pageVersion .identifier }} selected data-selected{{ end }}>{{ .title }}</option>
                    {{- end }}
                  </select>
                </div>
                <div class="clear"></div>
              </div>
            </li>
{{- end }}