Allow template to be undefined using onResourceLoad