Merge pull request #11145 from umbraco/v8/bugfix/11114-nested-content-not-rendering

Fixes Nested Content not rendering
This commit is contained in:
Nikolaj Geisle
2021-09-21 13:07:42 +02:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -535,7 +535,7 @@
// remove all tabs except the specified tab
var tabs = scaffold.variants[0].tabs;
var tab = _.find(tabs, function (tab) {
return tab.id !== 0 && (tab.alias.toLowerCase() === contentType.ncTabAlias.toLowerCase() || contentType.ncTabAlias === "");
return tab.id !== 0 && (tab.label.toLowerCase() === contentType.ncTabAlias.toLowerCase() || contentType.ncTabAlias === "");
});
scaffold.variants[0].tabs = [];
if (tab) {

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
using Umbraco.Web.Editors;
using Umbraco.Web.Mvc;
@@ -22,7 +23,7 @@ namespace Umbraco.Web.PropertyEditors
name = x.Name,
alias = x.Alias,
icon = x.Icon,
tabs = x.CompositionPropertyGroups.Select(y => y.Name).Distinct()
tabs = x.CompositionPropertyGroups.Where(x => x.Type == PropertyGroupType.Group && x.GetParentAlias() == null).Select(y => y.Name).Distinct()
});
}
}