Fix for chekcing the children belonging to Templates tree.

This commit is contained in:
elitsa
2018-11-04 22:54:25 +01:00
parent 2f3483453c
commit b9e30604a4

View File

@@ -25,6 +25,14 @@ namespace Umbraco.Web.Trees
[CoreTree(TreeGroup = Constants.Trees.Groups.Templating)]
public class TemplatesTreeController : TreeController, ISearchableTree
{
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
{
var root = base.CreateRootNode(queryStrings);
//check if there are any templates
root.HasChildren = Services.MacroService.GetAll().Any();
return root;
}
/// <summary>
/// The method called to render the contents of the tree structure
/// </summary>