Fixes initial tree loading to ensure it gets passed the right culture params, puts any non-translated variant name in brackets in the tree
This commit is contained in:
@@ -178,10 +178,7 @@ namespace Umbraco.Web.Trees
|
||||
return nodeMenu;
|
||||
}
|
||||
|
||||
protected override UmbracoObjectTypes UmbracoObjectType
|
||||
{
|
||||
get { return UmbracoObjectTypes.Document; }
|
||||
}
|
||||
protected override UmbracoObjectTypes UmbracoObjectType => UmbracoObjectTypes.Document;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true or false if the current user has access to the node based on the user's allowed start node (path) access
|
||||
@@ -280,13 +277,19 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
// we are getting the tree for a given culture,
|
||||
// for those items that DO support cultures, we need to get the proper name, IF it exists
|
||||
// otherwise, invariant is fine
|
||||
// otherwise, invariant is fine (with brackets)
|
||||
|
||||
if (docEntity.Variations.VariesByCulture() &&
|
||||
docEntity.CultureNames.TryGetValue(culture, out var name) &&
|
||||
!string.IsNullOrWhiteSpace(name))
|
||||
if (docEntity.Variations.VariesByCulture())
|
||||
{
|
||||
entity.Name = name;
|
||||
if (docEntity.CultureNames.TryGetValue(culture, out var name) &&
|
||||
!string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
entity.Name = name;
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.Name = "(" + entity.Name + ")";
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(entity.Name))
|
||||
|
||||
Reference in New Issue
Block a user