[patch] for-loops reset state of inner ifchanged
|Reported by:||dummy@…||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a use-case of ifchanged which maybe worth to talk about:
Normally ifchanged is placed in a for-loop (or other kind of loop). If this loop is enclosed by an other loop the state of the ifchanged in the inner loop maybe incorrect respective to the outer loop.
Since I'm not really good at explaining this I made two hardcopies which should explain it better. I have a template which display tournaments in the outer loop and within the tournaments a loop of competitions with a competition-date which should only rendered if the competition-date has changed regarding the previous value.
Normally this result in the output of ifchanged-demo1.png . Please look after 'Sparda-Bank West Mannschaftsturnier, Bochum, 16./17.9.2006' In the next line the date 16.09.2006 is missing.
With the patch the result would be shown as in for-reset-ifchanged-demo1.png.
This maybe break some of the normal usecase of ifchanged, so this needs to be reviewed and discussed forther.