Custom file extensions for templates in Umbraco backoffice
Hey all,
I've got a bit of a unique problem here. So basically, I'm trying to use an .net package (ActionMailerNext) to send emails from the various contact forms handled with surface controllers throughout our multi-site Umbraco installation. The idea is to have ActionMailer render templates located in the Umbraco views folder and be able to use the backoffice to edit these templates.
The problem is that ActionMailer needs template filenames to be in the format TemplateName.html.cshtml in order to find them. Umbraco on the other hand, requires TemplateName.cshtml to allow editing in the backoffice. Is there a way to change Umbraco configuration to allow templates with custom extensions in the backoffice without altering the source code?
I wasn't able to find a clean solution without modifying Umbraco's source code, so I ended up forking ActionMailerNext and modifying it to use Umbraco's template naming scheme.
Custom file extensions for templates in Umbraco backoffice
Hey all,
I've got a bit of a unique problem here. So basically, I'm trying to use an .net package (ActionMailerNext) to send emails from the various contact forms handled with surface controllers throughout our multi-site Umbraco installation. The idea is to have ActionMailer render templates located in the Umbraco views folder and be able to use the backoffice to edit these templates.
The problem is that ActionMailer needs template filenames to be in the format
TemplateName.html.cshtml
in order to find them. Umbraco on the other hand, requiresTemplateName.cshtml
to allow editing in the backoffice. Is there a way to change Umbraco configuration to allow templates with custom extensions in the backoffice without altering the source code?Hi Blake,
I think you have no choise and have to make changes in Umbraco.
It will be nice if you share result with us.
Thanks,
Alex
Hi Blake,
Did you find soultion?
Can you share with community?
Thanks,
Alex
Alex,
I wasn't able to find a clean solution without modifying Umbraco's source code, so I ended up forking ActionMailerNext and modifying it to use Umbraco's template naming scheme.
It's not ideal, but it's a workable solution.
Regards,
Blake
is working on a reply...