use data-template-name instead of id

Update snippet to use data-template-name attribute instead of id.