+ Moved variables resolution in the compiler Parser. (Temp. solution until the new...
[haanga.git] / tests / assert_templates / regroup.tpl
blob196a795dcced88b475e5826b53e2a1229d968f51
1 {# Test regroup with filters, and without filters #}
2 {% regroup users|dictsort:regroup_by by age as sorted_users %}
3 {% dictsort users regroup_by as t_users %}
4 {% regroup t_users by age as sorted_users1 %}
6 {% if sorted_users != sorted_users1 %}
7     Error
8 {% endif %}
10 {% for user in sorted_users %}
11     {{user['grouper'] }}
12     {% for u in user['list'] %}
13         {{forloop.counter}}-{{forloop.revcounter}}-{{forloop.revcounter0}} ({{forloop.parentloop.counter}}). {{ u['name']|capfirst }} ({% if forloop.first %}first{% else %}{% if forloop.last %}last{% endif %}{% endif %})
14     {% endfor %}
15 {% endfor %}