Sort content template tree items alphabetically, exclude element types (#14454)

This commit is contained in:
Callum Whyte
2023-07-31 20:44:02 +01:00
committed by GitHub
parent 3572642873
commit b2831dcd5e
2 changed files with 25 additions and 23 deletions

View File

@@ -549,7 +549,8 @@ public class ContentTypeController : ContentTypeControllerBase<IContentType>
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentsOrDocumentTypes)]
public IEnumerable<ContentTypeBasic> GetAll()
{
IEnumerable<IContentType> types = _contentTypeService.GetAll();
IEnumerable<IContentType> types = _contentTypeService.GetAll().Where(x => x.IsElement == false);
IEnumerable<ContentTypeBasic> basics = types.Select(_umbracoMapper.Map<IContentType, ContentTypeBasic>)
.WhereNotNull();