Convert template to saved Yama code