00:00
Buy Me a Beer
CMS

Randomly sort items on page load

Randomly sort CMS lists, grid items or any children with one simple attribute when you refresh your page

Blog Category G
Blog Category F
Blog Category E
Blog Category D
Blog Category C
Blog Category B
Blog Category A

Instructions

Firstly, make sure you have the VisualDX script before your </body>. Checkout the Quick Start for how to do this.

1

Copy this attribute:

Copied!
vdx-sort-random
1

Select the Collection List of a Webflow Collection

Collection List
Blog Category G
Blog Category F
Blog Category E
Blog Category D
Blog Category C
Blog Category B
Blog Category A
2

Paste the attribute into the Custom Attributes Name field of a Webflow Collection List

Collection List
Style
Settings
Interactions
Custom Attributes
Name
vdx-sort-random
Value
2

OPTION: Limit the number of desplayed items by adding a value

Collection List
Style
Settings
Interactions
Custom Attributes
Name
vdx-sort-random
Value
2
5

Publish

Blog Category G
Blog Category F
Blog Category E
Blog Category D
Blog Category C
Blog Category B
Blog Category A

Sponsor the Magic and
Buy Me a Beer

Ailín Tobin
Ireland

VisualDX is a free JavaScript library made for Webflow nerds like yourself. No ads, no paywalls—just pure, unfiltered JavaScript magic to supercharge your builds. If it’s saving you time, making your development easier, or just making you feel like a wizard in the Webflow Designer, consider slinging a virtual coffee my way.

Think of it like buying me a pint for keeping your Webflow spells flowing.

You can support it here.

Cheers, legend!

This is a method based on community and soundness. If you can't afford it, don't worry... One of your fellow Webflow nerds has already helped you out by donating.