How to publish a template