don't show down arrow when no doc types

This commit is contained in:
elitsa
2018-10-05 11:28:43 +02:00
parent 0cc5a01069
commit 373dfde730

View File

@@ -20,6 +20,14 @@ namespace Umbraco.Web.Trees
[CoreTree]
public class ContentTypeTreeController : TreeController, ISearchableTree
{
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
{
var root = base.CreateRootNode(queryStrings);
//check if there are any types
root.HasChildren = Services.ContentTypeService.GetAll().Any();
return root;
}
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
{
var intId = id.TryConvertTo<int>();