Hi all
I have a blog listing page which required to sort the post based on the updated time. And in this listing, we have a numbered pagination too (based on the one from Boilerplate theme)
However, the sort breaks when reached page 2.
{% if contents %}
{% set sorted_contents = contents|sort(True, False, 'updatedDateTime') %}
{% for content in sorted_contents %}
<div class="col-12 col-lg-4 mb-4 post-item">
<div class="card">
<div class="card-header">
<a href="{{ content.absolute_url }}">
<img src="{{content.featured_image}}" alt="{{ content.name }}" class="card-img" />
</a>
</div>
<div class="card-body">
<h3 class="card-title">
<a href="{{ content.absolute_url }}"
>{{ content.name }}</a
>
</h3>
<p class="card-text">
{{ content.post_list_content|striptags|truncate(200, True, "...") }}
</p>
<a href="{{ content.absolute_url }}" class="read-more"
><span class="decoration-underline">{{button_caption}}</span>
<span class="decoration-none">⟶</span></a
>
</div>
</div>
</div>
{% endfor %}
{% endif %}
Is there any thoughts to tackle this ? ![]()