How to render every integer in a range?

In a remote data file there is a key with the value of 24.

And I need to generate a series of query strings from 2 to 24.

e.g. ?page=2, ?page=3,… ?page=24

How can I go about it in Hugo?

{{ range seq 2 24 }}
  {{ printf "?page=%d" . }}<br>
{{ end }}
3 Likes

Thank you!

Or

{{ range seq 2 24 }}
  {{ querify "page" . }}<br>
{{ end }}
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.