2 ms·
Loops with special treatment for first and last items is quite simply dealt with by including a list of items (for example) in the static HTML mockup, the first
by dools 15y ago
Loops with special treatment for first and last items is quite simply dealt with by including a list of items (for example) in the static HTML mockup, the first and last of which is different from the middle one.
EDIT: Also in response to the issue of double handling, I did mention this in the article:
In that second example of course, we've got a bunch of duplicate markup, but that's not our problem. That is the job of whatever system you're using to fragmentify your templates and re-use common assets