Skip to content

Commit b9d3ba6

Browse files
committed
Hardcoded layout into Edit.cshtml
A peculiar consequence of moving the instersitial views out of the `/Area/Editor` folders (##f618fc8) is that this introduces potential conflicts with files in the calling assembly. This issue is addressed with `/wwwroot` via the `/_content/OnTopic.Editor.AspNetCore/` namespacing. But for the views themselves, it appears to simply map them on top of the containing application's view folders. As such, common files such as `_ViewStart.cshtml` can easily override the local copy, introducing conflicts. This could also happen with any of the other files, notably including `/Views/Shared/_Layout.cshtml`. As such, we may want to revisit the decision to move the views, at least, out of the `/Views/Editor` folder to avoid these types of conflicts. Alternatively, we can look into moving partials into a more unique path and hard-coding the references. For now, the immediate workaround is to hard-code the `Layout` so it doesn't risk getting overwritten by a `_ViewStart.cshtml`. But we'll need to come up with a longer-term solution prior to deployment.
1 parent 12e2126 commit b9d3ba6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

OnTopic.Editor.AspNetCore/Views/Editor/Edit.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@model OnTopic.Editor.Models.EditorViewModel
22

33
@{
4+
Layout = "~/Views/Shared/_Layout.cshtml";
45
ViewBag.Title = "Home Page";
56
var bindingModel = new EditorBindingModel();
67
}

0 commit comments

Comments
 (0)