but it makes no mention of how to set the tree title...
i've been digging into the source code and found this in the Tree.cs file:
public static string? GetRootNodeDisplayName(ITree tree, ILocalizedTextService textService)
{
var label = $"[{tree.TreeAlias}]";
// try to look up a the localized tree header matching the tree alias
var localizedLabel = textService.Localize("treeHeader", tree.TreeAlias);
// if the localizedLabel returns [alias] then return the title if it's defined
if (localizedLabel != null && localizedLabel.Equals(label, StringComparison.InvariantCultureIgnoreCase))
{
if (string.IsNullOrEmpty(tree.TreeTitle) == false)
{
label = tree.TreeTitle;
}
}
else
{
// the localizedLabel translated into something that's not just [alias], so use the translation
label = localizedLabel;
}
return label;
}
which looks to be that only the TreeAlias gets localised?
so i had a dig through some of the tree uses in the core and found the StaticFilesTreeController.cs which has the following:
as the TreeTitle is set to Static Files and that text doesn't appear in the en_us.xml language file its making me think that localising the tree title isn't possible?!
very confusing! if anyone can shed some light on this one it'd be great appreciated,
is it possible to localise the 'TreeTitle' for a custom backoffice tree?!
hey out there,
this one has me scratching my head! the docs (ooh, new shiny docs!) talk about how to get the tree group name from a language file:
tree groups
but it makes no mention of how to set the tree title...
i've been digging into the source code and found this in the Tree.cs file:
which looks to be that only the
TreeAlias
gets localised?so i had a dig through some of the tree uses in the core and found the StaticFilesTreeController.cs which has the following:
as the
TreeTitle
is set toStatic Files
and that text doesn't appear in the en_us.xml language file its making me think that localising the tree title isn't possible?!very confusing! if anyone can shed some light on this one it'd be great appreciated,
cheers,
jake
is working on a reply...