PHP Classes

File: tests/assert_templates/regroup.tpl

Recommend this page to a friend!
  Classes of Cesar D. Rodas   Haanga   tests/assert_templates/regroup.tpl   Download  
File: tests/assert_templates/regroup.tpl
Role: Auxiliary data
Content type: text/plain
Description: Testing file
Class: Haanga
Template engine to process Django style templates
Author: By
Last change: Update of tests/assert_templates/regroup.tpl
Date: 4 years ago
Size: 607 bytes
 

Contents

Class file image Download
{# Test regroup with filters, and without filters #} {% regroup users|dictsort:regroup_by by age as sorted_users %} {% dictsort users regroup_by as t_users %} {% regroup t_users by age as sorted_users1 %} {% if sorted_users != sorted_users1 %} Error {% endif %} {% for user in sorted_users %} {{user['grouper'] }} {% for u in user['list'] %} {{forloop.counter}}-{{forloop.revcounter}}-{{forloop.revcounter0}} ({{forloop.parentloop.counter}}). {{ u['name']|capfirst }} ({% if forloop.first %}first{% else %}{% if forloop.last %}last{% endif %}{% endif %}) {% endfor %} {% endfor %}