File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Umbraco.Web.BackOffice/PropertyEditors
Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 4
4
using System . Collections . Generic ;
5
5
using System . Linq ;
6
6
using Microsoft . AspNetCore . Mvc ;
7
+ using Umbraco . Cms . Core . Models ;
7
8
using Umbraco . Cms . Core . Services ;
8
9
using Umbraco . Cms . Web . BackOffice . Controllers ;
9
10
using Umbraco . Cms . Web . Common . Attributes ;
@@ -23,9 +24,7 @@ public NestedContentController(IContentTypeService contentTypeService)
23
24
}
24
25
25
26
[ HttpGet ]
26
- public IEnumerable < object > GetContentTypes ( )
27
- {
28
- return _contentTypeService
27
+ public IEnumerable < object > GetContentTypes ( ) => _contentTypeService
29
28
. GetAllElementTypes ( )
30
29
. OrderBy ( x => x . SortOrder )
31
30
. Select ( x => new
@@ -35,8 +34,7 @@ public IEnumerable<object> GetContentTypes()
35
34
name = x . Name ,
36
35
alias = x . Alias ,
37
36
icon = x . Icon ,
38
- tabs = x . CompositionPropertyGroups . Select ( y => y . Name ) . Distinct ( )
37
+ tabs = x . CompositionPropertyGroups . Where ( x => x . Type == PropertyGroupType . Group && x . GetParentAlias ( ) is null ) . Select ( y => y . Name ) . Distinct ( )
39
38
} ) ;
40
- }
41
39
}
42
40
}
Original file line number Diff line number Diff line change 535
535
// remove all tabs except the specified tab
536
536
var tabs = scaffold . variants [ 0 ] . tabs ;
537
537
var tab = _ . find ( tabs , function ( tab ) {
538
- return tab . id !== 0 && ( tab . alias . toLowerCase ( ) === contentType . ncTabAlias . toLowerCase ( ) || contentType . ncTabAlias === "" ) ;
538
+ return tab . id !== 0 && ( tab . label . toLowerCase ( ) === contentType . ncTabAlias . toLowerCase ( ) || contentType . ncTabAlias === "" ) ;
539
539
} ) ;
540
540
scaffold . variants [ 0 ] . tabs = [ ] ;
541
541
if ( tab ) {
You can’t perform that action at this time.
0 commit comments