Updates name of variant model mappign in list views - to use same logic as the content tree if a variant has not been set - we fallabck to the base/master lanaguage of the node name
This commit is contained in:
@@ -92,7 +92,16 @@ namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
public string Resolve(IContent source, ContentItemBasic<ContentPropertyBasic> destination, string destMember, ResolutionContext context)
|
||||
{
|
||||
return source.GetCultureName(context.GetCulture());
|
||||
var culture = context.GetCulture();
|
||||
|
||||
if (source.CultureNames.TryGetValue(culture, out var name) && !string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
return name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"({ source.Name })";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user