Default listview and custom listview lookup

This commit is contained in:
Per Ploug Krogslund
2015-07-07 11:29:11 +02:00
parent 15dcf43dd3
commit 76d9efb398

View File

@@ -135,10 +135,15 @@ namespace Umbraco.Web.Models.Mapping
expression => expression.ResolveUsing(new PropertyTypeGroupResolver(applicationContext, _propertyEditorResolver)))
.AfterMap(((type, display) =>
{
//TODO : How do we avoid hardcoding content here?
display.ListViewEditorName = Constants.Conventions.DataTypes.ListViewPrefix + type.Alias;
if (string.IsNullOrEmpty(type.Alias))
display.ListViewEditorName += "Content";
//default
display.ListViewEditorName = Constants.Conventions.DataTypes.ListViewPrefix + "Content";
if (string.IsNullOrEmpty(type.Name) == false)
{
var name = Constants.Conventions.DataTypes.ListViewPrefix + type.Name;
if(applicationContext.Services.DataTypeService.GetDataTypeDefinitionByName(name) != null)
display.ListViewEditorName = name;
}
}));
config.CreateMap<PropertyGroupDisplay, PropertyGroup>()