From c9905740d5be5a9949fe806d25c1d2dc1c3e1433 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 16 Oct 2012 17:23:22 -0700 Subject: [PATCH] Sorting content types in Form editor --HG-- branch : 1.x --- src/Orchard.Web/Core/Contents/Rules/ContentForms.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Orchard.Web/Core/Contents/Rules/ContentForms.cs b/src/Orchard.Web/Core/Contents/Rules/ContentForms.cs index b023dfbe1..c3fd90d5e 100644 --- a/src/Orchard.Web/Core/Contents/Rules/ContentForms.cs +++ b/src/Orchard.Web/Core/Contents/Rules/ContentForms.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Web.Mvc; using Orchard.ContentManagement.MetaData; using Orchard.DisplayManagement; @@ -40,7 +41,7 @@ namespace Orchard.Core.Contents.Rules { f._Parts.Add(new SelectListItem { Value = "", Text = T("Any").Text }); - foreach (var contentType in _contentDefinitionManager.ListTypeDefinitions()) { + foreach (var contentType in _contentDefinitionManager.ListTypeDefinitions().OrderBy(x => x.DisplayName)) { f._Parts.Add(new SelectListItem { Value = contentType.Name, Text = contentType.DisplayName }); }