From 163a03986cd37b4ec73bcddd7bc102e599e36d15 Mon Sep 17 00:00:00 2001 From: per ploug Date: Tue, 18 Nov 2014 13:22:56 +0100 Subject: [PATCH] force add base.cshtml --- .../Views/Partials/Grid/Editors/Base.cshtml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Base.cshtml 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