global flag on template render