Added support for appending template to container