Closed fsepoy closed 9 years ago
Have you tried calling: Razor.SetTemplateBase(typeof(MyCustomTemplateBase<>));
in Application_Start
?
Razor only has a SetTemplateService() method. I tried the below code but the missing image imbedder throws an error. I have had to abandon trying to get this to work in console apps. Sadly I got to go back to the old fashion way of doing things.
TemplateServiceConfiguration templateConfig = new TemplateServiceConfiguration
{
BaseTemplateType = typeof(RazorEngineBaseTemplate<>)
};
Razor.SetTemplateService(new TemplateService(templateConfig));
Thanks for the help though and kudos for a great tool that works brilliantly in MVC.
Hi, I'm trying to use postal in a non mvc app but I cannot use the @Html.EmbedImage to embed an image into an email. I have seen suggestions on using a custom base template for RazorEngine //http://stackoverflow.com/a/19434112 but how could I implement that with the FileSystemRazorViewEngine.
Any help would be appreciated. I'd hate to have to abandon this project.
Thanks.