Working with:
{{ $start := math.Max 2 (sub .PageNumber (math.Floor (div $slots 2))) }}
...
{{ if lt $start 2 }}
{{ $start := 2 }}
{{ end }}
{{ $start := 2 }} won’t change $start outside the if block. I suppose this is just how Go Templates work.
So, how should I go about conditionally changing a variable?