use $templateName for check called main template.