Added the ability to specify template in rendering