Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Random Posts in Static sites

#2758
Avatar photo[anonymous]

Is there any way to show randomly @config.custom.uploadImage1 or @config.custom.uploadImage2 on a div?

My code is:

—————–
<div id=”bannersLPost” class=”bannersLPost”>
<figure>
<img
class=”lazyload”
{{#checkIf @config.custom.lazyLoadEffect ‘!==’ “lqip” }}
src=”{{@config.custom.uploadBanner1}}”
{{else}}
data-src=”{{@config.custom.uploadBanner1}}”
{{/checkIf}}
{{responsiveSrcSet @config.custom.uploadBanner1}}
{{responsiveSizes}}>
</figure></div>

———-

I have @ config.custom.uploadBanner1 and @ config.custom.uploadBanner2 … I want to show randomly banner1 or banner2.

How could i achieve that?

Thanks a lot in advanced.