Choosing randomly an item in a collection

Hello !
Does anybody has an idea to select randomly an item in a collection. I have a collection of “advices” and I want to display a different advice anytime a page is viewed. I imagine this can be achieved by javascript but I do not see where to start…


Here is my public share link: LINK
(how to access public share link)

1 Like

Hey @mietlicki I imagine that you can apply the same kind of js as used here to randomize a slide on load:
http://forum.webflow.com/t/different-slider-each-time-the-page-loads/21720/3

1 Like

Thanks for your help, but I am not sure this will works. In a slider, all slides are uploaded on client side so js can easily random the selected slide. In the case of CMS collections, I imagine that all the items stays on the server side…

Probably the only way to do is that the webflow team adds “random sort” of a collection…

But maybe I’m wrong ?

@mietlicki

Thanks for your patience. This feature is now live! Try it out :smile:
http://forum.webflow.com/t/new-feature-random-dynamic-listing-ordering/23638

2 Likes

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