質問

MVCの外側でSpark Viewエンジンを使用してHTMLの電子メールを作成しています。私は共通のレイアウト要素をマスター(テンプレート)ビュー(application.spark)に引っ張って、<use master="Application.spark">を使用してマイ* .sparkファイルからマスタービューを参照しました。ただし、マスタービューのHTMLは自分のEメールに表示されません。これを行う方法は何ですか?これは可能な限り?です

役に立ちましたか?

解決

Spark doesn't need MSMVC specifically to have master layouts and views work together.

But unless you specifically supply your own version of the IDescriptorFilter, the DefaultDescriptorFilter will be used, and it expects that the Application.spark file is located in a folder called Shared or Layouts under the main Views folder. If it's in one of those two, you don't even need to reference it from any of your *.spark files, it will be used conventionally because of its name and location.

That's about all I can say from the info you've given, but I guess it could be something else, and I'd have to see some code or an example to help more...

Hope that helps, Rob

他のヒント

I solved this by adding by adding Application.spark as template to the descriptor:

descriptor.AddTemplate("Application.spark");

and used ${Content["view"]} instead of <use content="view"/> in the template.

Let me know if you have any issues after trying it.

There is also a workitem at the CodePlex site: http://sparkviewengine.codeplex.com/workitem/9035

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top