Hi,
When setting a template we have to do something like:
Dynamicweb.Templatev2.Template template = new Dynamicweb.Templatev2.Template("MyModule/" + Properties.Values["SampleTemplate"].ToString());
However, we sometimes use sub-folder under "MyModule" and would like to get the template in a standard way, so we use the _path settinf, for example
Dynamicweb.Templatev2.Template template = new Dynamicweb.Templatev2.Template(Properties.Values["SampleTemplate_path"].ToString().Replace("Files/Templates/",""));
But as you can see we need to remove the "Files/Templates" otherwise it won't work. Is there a way to do this simpler/cleaner? So if we changed the "Folder" attribute in the _Edit, everything would work, without having to manipulate the string?
Best Regards,
Nuno
Developer forum
template path - clean approach
Replies
You must be logged in to post in the forum