force add base.cshtml
This commit is contained in:
24
src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Base.cshtml
Normal file
24
src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Base.cshtml
Normal file
@@ -0,0 +1,24 @@
|
||||
@model dynamic
|
||||
@using Umbraco.Web.Templates
|
||||
|
||||
@functions {
|
||||
public static string EditorView(dynamic contentItem)
|
||||
{
|
||||
string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString();
|
||||
view = view.ToLower().Replace(".html", ".cshtml");
|
||||
|
||||
if (!view.Contains("/")) {
|
||||
view = "grid/editors/" + view;
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@try
|
||||
{
|
||||
string editor = EditorView(Model);
|
||||
<text>@Html.Partial(editor, (object)Model)</text>
|
||||
}
|
||||
catch (Exception ex) {
|
||||
<pre>@ex.ToString()</pre>
|
||||
}
|
||||
Reference in New Issue
Block a user