Adds in some logic if we have no child trees for that application/section then we create a SingleTreeRoot
This commit is contained in:
@@ -78,12 +78,22 @@ namespace Umbraco.Web.Trees
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(collection.Count > 0)
|
||||||
|
{
|
||||||
var multiTree = TreeRootNode.CreateMultiTreeRoot(collection);
|
var multiTree = TreeRootNode.CreateMultiTreeRoot(collection);
|
||||||
multiTree.Name = Services.TextService.Localize("sections/" + application);
|
multiTree.Name = Services.TextService.Localize("sections/" + application);
|
||||||
|
|
||||||
return multiTree;
|
return multiTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Otherwise its a application/section with no trees (aka a full screen app)
|
||||||
|
//For example we do not have a Forms tree definied in C# & can not attribute with [Tree(isSingleNodeTree:true0]
|
||||||
|
var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture);
|
||||||
|
var section = Services.TextService.Localize("sections/" + application);
|
||||||
|
|
||||||
|
return TreeRootNode.CreateSingleTreeRoot(rootId, null, null, section, TreeNodeCollection.Empty, true);
|
||||||
|
}
|
||||||
|
|
||||||
var rootNodeGroups = new List<TreeRootNode>();
|
var rootNodeGroups = new List<TreeRootNode>();
|
||||||
|
|
||||||
//Group trees by [CoreTree] attribute with a TreeGroup property
|
//Group trees by [CoreTree] attribute with a TreeGroup property
|
||||||
|
|||||||
Reference in New Issue
Block a user