Set isMainPage to true on TemplateRenderer.ExecuteTemplateRendering (#10684)
* Set isMainPage to true on TemplateRenderer.ExecuteTemplateRendering (#10683) * Added comment * Tweak comment for clarity Co-authored-by: Paul Johnson <pmj@umbraco.com>
This commit is contained in:
@@ -152,7 +152,8 @@ namespace Umbraco.Cms.Web.Common.Templates
|
||||
{
|
||||
var httpContext = _httpContextAccessor.GetRequiredHttpContext();
|
||||
|
||||
var viewResult = _viewEngine.GetView(null, $"~/Views/{request.GetTemplateAlias()}.cshtml", false);
|
||||
// isMainPage is set to true here to ensure ViewStart(s) found in the view hierarchy are rendered
|
||||
var viewResult = _viewEngine.GetView(null, $"~/Views/{request.GetTemplateAlias()}.cshtml", isMainPage: true);
|
||||
|
||||
if (viewResult.Success == false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user