save the template key in config