Streaming live at 10am (PST)

Choosing randomly an item in a collection


#1

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)


#2

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


#3

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 ?


#4

@mietlicki

Thanks for your patience. This feature is now live! Try it out :smile:


#5

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