add options to support set basePath and omit extension in template function name