template context functions autodiscovery