First take localized text into account before the title property when working with tree headers
This commit is contained in:
@@ -43,16 +43,18 @@ namespace Umbraco.Web.Trees
|
||||
get
|
||||
{
|
||||
|
||||
//if title is defined, return that
|
||||
if(string.IsNullOrEmpty(_attribute.Title) == false)
|
||||
return _attribute.Title;
|
||||
|
||||
|
||||
|
||||
//try to look up a tree header matching the tree alias
|
||||
var localizedLabel = Services.TextService.Localize("treeHeaders/" + _attribute.Alias);
|
||||
if (string.IsNullOrEmpty(localizedLabel) == false)
|
||||
if (!string.IsNullOrEmpty(localizedLabel))
|
||||
return localizedLabel;
|
||||
|
||||
//if title is defined, return that
|
||||
if (!string.IsNullOrEmpty(_attribute.Title))
|
||||
return _attribute.Title;
|
||||
|
||||
//is returned to signal that a label was not found
|
||||
return "[" + _attribute.Alias + "]";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user