TemplateFunction

Hi,
What is the purposes of attribute filetype in a TemplateFunction (and why it get's not automatically set until I extracting the subtemplate form the parent template)?
What is the purposes of attribute filetype in a TemplateFunction (and why it get's not automatically set until I extracting the subtemplate form the parent template)?