templates.js added support for !@first and !@last conditionals