I have 20 product images which I would like to loop through multiple times as I’m trying to created a scrolling image banner, like a carousel.
The following code shows the images once:
<div>
<div>
{{range .Params.images}}
{{$img := (site.GetPage "/products/assets").Resources}}
{{$img := $img.GetMatch (printf "%s.*" (anchorize .))}}
{{with $img}}
<img src="{{.RelPermalink}}">
{{end}}
{{end}}
</div>
</div>
How would I go about repeating this? I believe seq
might be the right function to use, but struggling to get it to work.