Updated to use SetHTMLTemplate()