Streaming live at 10am (PST)

CMS filter random bug?

Hey Guys ~ I have a site I’ve developed for an organization with a large number of members that I want to sort/display randomly.

I have the collection to display random, which seems to work fine when displaying 200+ members, but when I display just 3-4 it seems to always start at #1, instead of randomly. Is there a way I can make it ALWAYS display truly random?

One page I have a testimonial block is here:

Thank you !

Here is my site Read-Only:

A random sort of a collection list is cached on the CDN infrastructure for approx 12 hours. Not random every page load. If you limit a collection and choose random, the limit happens first, then random. I think what you want is the opposite. By the way, a collection list is limited to 100 items. Yes, you can paginate but you can’t get more than 100 on a page load.

You would need to use custom code to pull this off.
You could accomplish this by making an Ajax call to the full list on a page that displays it, then randomly sort the list, and slice the array to limit it. If you’re dealing with a smaller list you could follow this fiddle example.


Thanks for the info !! Yes, I have a list of members 250 large, but I’m not concerned about that. I have a testimonial block displaying a list of three items, one per page, and that block seems to want to load one much more often than the other two. I wanted to know if possible the random function actually loads randomly, on every page refresh.

It does not, as I said, it is cached which is why it’s so snappy.

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