Use null instead of an empty string for the directory name pattern.
Added TemplateGroup for selecting the currently used template.