#17666: having 1 (or more) content types containing ContainerPart but not RoutePart brings down entire ContainablePart

- Containable does not rely on RoutePart to get the title, it just uses metadata.
- Better display when a container is not routable.

--HG--
branch : 1.x
This commit is contained in:
Dave Reed
2011-04-05 15:01:43 -07:00
parent 02e4dbdb66
commit e964798de2
4 changed files with 12 additions and 11 deletions

View File

@@ -50,7 +50,7 @@ namespace Orchard.Core.Containers.Drivers {
var listItems = new[] { new SelectListItem { Text = T("(None)").Text, Value = "0" } }
.Concat(containers.Select(x => new SelectListItem {
Value = Convert.ToString(x.Id),
Text = x.ContentItem.TypeDefinition.DisplayName + ": " + x.As<IRoutableAspect>().Title,
Text = x.ContentItem.TypeDefinition.DisplayName + ": " + _contentManager.GetItemMetadata(x.ContentItem).DisplayText,
Selected = x.Id == model.ContainerId,
}))
.ToList();