How to allow StringTemplate.NET to load template files with the extension ".dwt"?

The default template file extension for StringTemplate is ".st". Now I have several template files in the folder, and their extension is ".dwt". Is there a way to change the default template file extension and load all of them as shown below:

StringTemplateGroup group = new StringTemplateGroup("views", viewPath);
+3
source share
1 answer

A pretty big hack that might work is to copy all the templates to the temp directory, but with the correct extension type by default.

0
source

Source: https://habr.com/ru/post/1751195/


All Articles