support on-demand loading of templates