News for hackers. Stuff that matters.
Re:Your templating engine sucks and everything you've ever w... by dools on Sunday December 11, 2011 @01:04AM (#3339414)
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

There are no comments on this comment yet.