Implemented a simple way of output a template to a string.