Skip to content

Commit

Permalink
Hardcoded layout into Edit.cshtml
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JeremyCaney committed Dec 31, 2019
1 parent 12e2126 commit b9d3ba6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions OnTopic.Editor.AspNetCore/Views/Editor/Edit.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@model OnTopic.Editor.Models.EditorViewModel

@{
Layout = "~/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Home Page";
var bindingModel = new EditorBindingModel();
}
Expand Down

0 comments on commit b9d3ba6

Please sign in to comment.