Hi, it would be great to add a random sorting option for collections, for example, for displaying testimonials across the site.
Yes, please! And every page reload randomizes again!
Haha how would this happen?
@thesergie
Have a parent class for the dynamic list, then the same class for each dynamic list item, and the js used on this page:
OOh I feel you now… every page load would randomize the list. For some reason i thought you meant that clicking on an item would choose a random page for you.
That would be wild! I’m gonna try and use this js real quick to see if I can get it working on a dynamic list
thanks @Waldo! that would be super cool!
I need this so much, my client want a randomized order of brands and i dont know how do it. =/
Yes, this is absolutely a “must have”, and quickly !!! A lot of people needs random sorting of collections…
Yes, random sorting!!
Hey @discovoador @buntestrahlen @tmfukushima @mietlicki @perkristian & @davidvm you can achieve this by adding in the following script (replace the “listitemclassname” with the class name which you give your list items):
<script> var cards = $(".listitemclassname");
for(var i = 0; i < cards.length; i++){
var target = Math.floor(Math.random() * cards.length -1) + 1;
var target2 = Math.floor(Math.random() * cards.length -1) +1;
cards.eq(target).before(cards.eq(target2));
} </script>
Here’s an example:
http://flow-in.webflow.io/
Here’s the Webflow Read-Only link: https://preview.webflow.com/preview/flow-in?preview=99d20c3007c32ab09ef1da4455a8de8c
Feel free to ask any questions. Have fun!
i will try that tomorrow. trank you!
Yep, all I needed, thanks @Waldo!
Thanks Waldo, i’ll try today. If works, will safe me a lot of time (until now, i made a sort list manualy every week =/)
Currently our caching for CMS sites gets cleared every 12hrs (twice in one day). So that means if we have sort set to random it will be randomized every 12 hours. Would that work?
Great @thesergie, that would absolutely do the trick for me.
@perkristian @tmfukushima @discovoador @buntestrahlen @mietlicki @davidvm your wishes have come true:
http://forum.webflow.com/t/new-feature-random-dynamic-listing-ordering/23638
@perkristian @tmfukushima @discovoador @buntestrahlen @davidvm
Thanks for your patience. This feature is now live! Try it out
http://forum.webflow.com/t/new-feature-random-dynamic-listing-ordering/23638
Great stuff @PixelGeek & @Waldo!
Works like a charm