How can I alphabetically sort blocks by title?

Elka
Shopify Partner
15 0 1

Hello

I want to make this block sorted by alphabet, I had tried sort_natural and sort but none of them is working, can someone help me, please?

 

{% assign blocks = section.blocks | sort_natural: 'title' %}
{% for block in blocks %}
{% render 'collection_card', collection: block.settings.collection %}
{% endfor %}

 

Replies 0 (0)