Jan Losert asked on Twitter how to specify a custom sort for Webflow Collection Items. At first, one might think that adding a text field to capture a value is the solution. But Losert pointed out that this approach breaks for any items that do not have the value set (A workaround oculd be to make the field required.) Matt Varughese provided a code snippet and instructions on how to use it in a series of tweets. (Be sure to open thread to see all relevant tweets).
<script>
— Matt Varughese (@mattvaru) May 31, 2021
var Webflow = Webflow || [];
Webflow.push(function () {
let element = $('div.sort-order:empty').parent();
let list = element.parent();
element.appendTo(list);
});
</script>
let's keep in touch!
Receive once-in-awhile updates from the site and the world of #NoCode. Unsubscribe anytime.
Thank you for signing up!
Oops! Something went wrong while submitting the form.
Don't want yet ANOTHER email? Follow @colleenmbrady on Twitter.