TemplateFactory: use configuration parameter instead of constant