add basePath to templates