-
-
Notifications
You must be signed in to change notification settings - Fork 405
Open
Description
From a recent discussion I had with Duncan: statamic/cms#11719 (comment)
I believe the documentation could use a small example of how to shuffle
a collection's entries (though it could be an exact equivalent of sort="random"
; I do not know if one is faster than the other).
-
The Antlers syntax uses a self-iterating assignment (if there is a better option, make sure to use it instead):
{{ randomly_sorted_pages = { collection:pages } | shuffle }} {{# Do your thing here #}} {{ /randomly_sorted_pages }}
-
As for the Blade syntax, since I do not use Blade, I can't say.
Metadata
Metadata
Assignees
Labels
No labels