Merge pull request #5520 from kjac/v8-fix-macro-tree-sorting

V8: Sort macros alphabetically
This commit is contained in:
Sebastiaan Janssen
2019-05-31 16:21:29 +02:00
committed by GitHub

View File

@@ -1,8 +1,6 @@
using System;
using System.Linq;
using System.Linq;
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Models.Entities;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
@@ -31,7 +29,7 @@ namespace Umbraco.Web.Trees
if (id == Constants.System.RootString)
{
foreach (var macro in Services.MacroService.GetAll())
foreach (var macro in Services.MacroService.GetAll().OrderBy(m => m.Name))
{
nodes.Add(CreateTreeNode(
macro.Id.ToString(),