Add support for dynamic templates
Merge pull request #388 from XWB/dynamic_template_support

Add support for dynamic templates