Merge pull request #5164 from kjac/v8-fix-navigation-partial-template
V8: Fix navigation partial view template
This commit is contained in:
@@ -1034,10 +1034,12 @@ namespace Umbraco.Core.Services.Implement
|
||||
//strip the @inherits if it's there
|
||||
snippetContent = StripPartialViewHeader(snippetContent);
|
||||
|
||||
//Update Model.Content. to be Model. when used as PartialView
|
||||
//Update Model.Content to be Model when used as PartialView
|
||||
if (partialViewType == PartialViewType.PartialView)
|
||||
{
|
||||
snippetContent = snippetContent.Replace("Model.Content.", "Model.");
|
||||
snippetContent = snippetContent
|
||||
.Replace("Model.Content.", "Model.")
|
||||
.Replace("(Model.Content)", "(Model)");
|
||||
}
|
||||
|
||||
var content = $"{partialViewHeader}{Environment.NewLine}{snippetContent}";
|
||||
|
||||
Reference in New Issue
Block a user