Added function to register templates in plugins