@model dynamic @try { string editor = EditorView(Model); @await Html.PartialAsync(editor, Model as object) } catch (Exception ex) {
@ex.ToString()
} @functions{ public static string EditorView(dynamic contentItem) { string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); view = view.Replace(".html", ".cshtml"); if (!view.Contains("/")) { view = "grid/editors/" + view; } return view; } }