{{- define "ref_query" -}} {{- if .ref_type -}}?{{- .ref_type -}}={{- .ref_name -}}{{- end -}} {{- end -}}