Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added PartialIteration object used when rendering collections #7698
Based on the ideas in #5634 but refactored into an object as per the comments.
The iteration object is available as the local variable
It gives access to the +size+ of the collection beeing iterated over,
For now the "template_name_counter" variable is kept but is deprecated.
referenced this pull request
Nov 28, 2012
+1 for this pull request. Since PartialIteration implements #index, I believe the best solution regarding variable_counter would be to print/log a deprecation warning and remove it in 4.1 or another release. I could try to implement this if you guys want. Also let me know if I can help with anything.
The problem is that getting this functionality with an deprecation warning for the old counter variable is as I see it pretty much impossible without adding (some what hard to follow) code to
When looking at this again I have a hard time feeling the addition is worth hacking
So unless someone have a great idea of how to achieve this maybe we should close this for now