saving a template to the DB.