umbraco を使用してワークフローを作成しました。私がやろうとしているのは、かみそりテンプレート ( umbraco.forms) によって作成された html を取得するワークフローを作成することです。
のテンプレートがある場所は次のとおりですumbraco.forms
Views\Partials\Forms\Emails このテンプレートは、このワークフローが呼び出されたときにメールで送信したいものです。
public class SendMail : WorkflowType
{
//Here I get the path where the razor template is
[Umbraco.Forms.Core.Attributes.Setting("Path to template",
Description = "Path to template",
View = "TextField")]
public string Template{ get; set; }
public SendMail()
{
this.Id = new Guid("ccbeb0d5-adaa-4729-8b4c-4bb439dc0204");
this.Name = "Send Mail";
this.Description = "Send Mail";
this.Icon = "icon-plugin";
this.Group = "Services";
}
//When workflow get called this method is executed
public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
{
//here I'm trying to get the template converted to string however isn't work
// string template = html.Raw(Template).ToString();
}
}
試しstring template = html.Raw(Template);ましたが、アクセスできませんhtml.Raw("");
私はこのrecord.ParseWithRazorView(filePath);解決策を試しましたが、存在しないようです
近いことを行うワークフローがありますが、このコードを書き直したりアクセスしたりすることはできないようです
私のふりを正確に理解していない場合は、コメントしてください。すべての詳細で質問を更新します
