Using attributes in templates