You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 ofsort="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):
As for the Blade syntax, since I do not use Blade, I can't say.
The text was updated successfully, but these errors were encountered: