diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Base.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Base.cshtml new file mode 100644 index 0000000000..a86c04819a --- /dev/null +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Base.cshtml @@ -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); + @Html.Partial(editor, (object)Model) +} +catch (Exception ex) { +
@ex.ToString()
+} \ No newline at end of file