sync template with attrs