Skip to content

Commit

Permalink
Merge pull request umbraco#11145 from umbraco/v8/bugfix/11114-nested-…
Browse files Browse the repository at this point in the history
…content-not-rendering

Fixes Nested Content not rendering
  • Loading branch information
Zeegaan authored Sep 21, 2021
2 parents 27e74e7 + 5796b84 commit 3ad2e74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions src/Umbraco.Web/PropertyEditors/NestedContentController.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -22,7 +23,7 @@ public IEnumerable<object> GetContentTypes()
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()
});
}
}
Expand Down

0 comments on commit 3ad2e74

Please sign in to comment.