added script to append template-generated content to the DOM