Sorting blog posts alphabetically

SOLVE
Occasional Contributor

Hello!

 

I created a dictionary using a blog https://www.naturalinsight.com/retail-dictionary

 

I would like to order the posts alphabetically instead of publishing date. Is there a way to do that?

 

Thanks!

 

Caroline

COS
Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Esteemed Advisor | Partner

You can use a sort filter on your contents loop

{% for content in contents|sort(False, False, 'name') %}

{% endfor %}
- Jonathan Sumner
2 Replies 2
Highlighted
Esteemed Advisor | Partner

You can use a sort filter on your contents loop

{% for content in contents|sort(False, False, 'name') %}

{% endfor %}
- Jonathan Sumner
Highlighted
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

But this will only sort what's currently on the page, i.e the current loop.

Reply
0 Upvotes