2013-08-29 113 views
0

我想有模板循環,如果當前迭代是從以前的迭代

{% for user_id, x, y in information %} 
    {% if it is the first time that user_id is different from the previous iteration %} 
     do something 
    {% elseif user_id is different from the user_id in the previous iteration %} 
     do something 
    {% endif %} 

誰能幫助不同。謝謝!!!

回答