Use template.data in events