I had renamed my Bitbucket account but have since moved to Github. It used to be a Mercurial repo, so I just copied it over to a Git repo on Github for you. Here's the link:
Thanks for taking the time to put this up on Github.
On a version 7 install, one only needs to copy the RazorEngine.dll to the /bin folder for this to show up on the Contour. Understand this is pre-v7 and razor support built-int, nevertheless the site doesnt break and workflow shows up on the Contour.
The issue is when i select the sample razor file to send the e-mail, accepts it but no email is send. I presume this is to do with the razor code inside the sample file?
Do I need to update anything in this sample file, to make it happy with the version 7?
@* This file has been renamed with a .txt extension for viewing purposes only. *@
@{
Intro
This is a sample email using razor to convert a record into a custom email
Here you can get specific records and format them accordingly:
It's been so long since I've used this I'm not sure, but I don't recall having to modify it. Do you have your SMTP settings set up in your web.config? It uses the SmtpClient class to send emails.
Hey Nick! Definitely! I haven't been spending as much time doing Umbraco development lately. I've basically been doing pure JavaScript with all my time. Looks like you've got your work cut out for you. :) Have you guys begun working on this yet? Nice Office Space reference too, haha!
It's possible. I haven't been developing for Umbraco/Contour for a bit so I'm not sure if there have been API changes. You might also need to update the RazorEngine library as well. I would skim over the source code as well and make sure it still adheres to the latest Contour API.
It's pretty simple (less than 80 lines of actual code). Basically it just reads the cshtml file specified and parses it with the RazorEngine library and passes in the Contour record as it's context. Next it creates a MailMessage and sets the body to the output of the RazorEngine's parse method. Finally it creates an SMTPClient and sends the MailMessage.
Good luck and feel free to ask any questions you may have. :)
I had begun working on it before it became a work project. Now that it has a few weeks of time assigned to it, I may scrap what I have so far so I can make sure everything is setup properly for the new scope (and probably put it under the Rhythm github account).
Latest contour
Will this work with latest version of contour v3 if not would it be possible to get the source so I can rebuild.
Regards
Ismail
I haven't tested this in ages, but sure, the source can be found here:
https://bitbucket.org/liquidplastik/pandemicode-umbraco-extensions
It could probably be rewritten better now that Umbraco has better Razor support.
Micheal,
It all works. Thanks for the source link.
Regards
Ismail
Hi Ismail,
Current version on our.umbraco.org seems not working. Did you manage to rebuild the package? If yes can you share please?
Thanks
Osman
The download link for the source seems to be dead.
Anyone managed to get this working on the v7?
Would appreciate if you can share the source / build
Hey Keilo,
I had renamed my Bitbucket account but have since moved to Github. It used to be a Mercurial repo, so I just copied it over to a Git repo on Github for you. Here's the link:
https://github.com/michael-lawrence/pandemicode-umbraco-extensions
Feel free to do what you want with it. :)
Michael! Long time no see. Haha.
Look what you're missing out on at Rhythm: https://our.umbraco.org/forum/umbraco-7/developing-umbraco-7-packages/69933-replacing-contour-umbraco-forms-with-something-better
Well, it'll be open source, so I suppose you won't be missing much :-)
Hey Michael
Thanks for taking the time to put this up on Github.
On a version 7 install, one only needs to copy the RazorEngine.dll to the /bin folder for this to show up on the Contour. Understand this is pre-v7 and razor support built-int, nevertheless the site doesnt break and workflow shows up on the Contour.
The issue is when i select the sample razor file to send the e-mail, accepts it but no email is send. I presume this is to do with the razor code inside the sample file?
Do I need to update anything in this sample file, to make it happy with the version 7?
@foreach (var r in Model.Record.RecordFields) {-
}
}Caption: @r.Value.Field.Caption
@r.Value.ValuesAsString()
Many thanks!
It's been so long since I've used this I'm not sure, but I don't recall having to modify it. Do you have your SMTP settings set up in your web.config? It uses the SmtpClient class to send emails.
Hey Nick! Definitely! I haven't been spending as much time doing Umbraco development lately. I've basically been doing pure JavaScript with all my time. Looks like you've got your work cut out for you. :) Have you guys begun working on this yet? Nice Office Space reference too, haha!
Hey Michael
Yes I have the SMTP setup and working, I have other send email workflow (default) and this. The first one is sending the email but the second isnt.
As I copied the RazorEngine.dll to the /bin folder of the Umbraco 7
do you think the sample razor needs to be updated to get the values?
like, if Model.Record.GetRecordField will still work..
Hey Keilo,
It's possible. I haven't been developing for Umbraco/Contour for a bit so I'm not sure if there have been API changes. You might also need to update the RazorEngine library as well. I would skim over the source code as well and make sure it still adheres to the latest Contour API.
Thanks Michael.
I was curious how Ismail get it working, as he didnt mention of any change in razor code but rather re-compile.
I'll go through the code, and perhaps learn more about it
cheers!
It's pretty simple (less than 80 lines of actual code). Basically it just reads the cshtml file specified and parses it with the RazorEngine library and passes in the Contour record as it's context. Next it creates a MailMessage and sets the body to the output of the RazorEngine's parse method. Finally it creates an SMTPClient and sends the MailMessage.
Good luck and feel free to ask any questions you may have. :)
Pure JavaScript is an oxymoron :-P
Sounds like fun though :-)
I had begun working on it before it became a work project. Now that it has a few weeks of time assigned to it, I may scrap what I have so far so I can make sure everything is setup properly for the new scope (and probably put it under the Rhythm github account).
is working on a reply...