Register template globals via compiler pass