{% for group in page.children %}
{% for item in group.children.order('title', 'desc') %}
{{ loop.index }}
{% endfor %}
{% endfor %}
I am wanting to group all “item” results as a whole, so that the “loop.index” doesn’t reset when it’s a new “group”. Also, I am wanting all of the “item” results to be ordered by title as a whole. I haven’t been able to accomplish this after many attempts. Thanks in advance for your help.
Thanks so much! I ended up with a solution by doing this:
{% set item_count = 0 %}
{% for group in page.children %}
{% for item in group.children.order('title', 'desc') %}
{% set item_count = item_count + 1 %}
{% endfor %}
{% endfor %}
---