我想覆盖Container.cshtml
此路径Orchard.Core\Containers(folder)\Views\EditorTemplates\Container.cshtml
中的视图:到此路径中的视图:
MyModule\\Views\EditorTemplates\MyContainer.cshtml
现在!,我IShapeTableProvider
为此目的实现了接口:
public class MyShapeProvider : IShapeTableProvider
{
public void Discover(ShapeTableBuilder builder)
{
builder.Describe("Container")
.OnDisplaying(displaying =>
{
displaying.ShapeMetadata.Alternates
.Add("Container_MyContainer");
});
}
}
该代码是在项目的启动时间调用的,但不要工作!
对不对?
谢谢你的帮助!