CMS Development

CarolineLane
Participante

Sorting blog posts alphabetically

resolver

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

0 Me gusta
1 Soluciones aceptada
Jsum
Solución
Asesor destacado

Sorting blog posts alphabetically

resolver

You can use a sort filter on your contents loop

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

{% endfor %}

Ver la solución en mensaje original publicado

2 Respuestas 2
Jsum
Solución
Asesor destacado

Sorting blog posts alphabetically

resolver

You can use a sort filter on your contents loop

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

{% endfor %}
LPM
Colaborador líder | Partner nivel Diamond
Colaborador líder | Partner nivel Diamond

Sorting blog posts alphabetically

resolver

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

0 Me gusta