protected override Umbraco.Web.Models.Trees.TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
        {
            var nodes = new Umbraco.Web.Models.Trees.TreeNodeCollection();
            var item  = this.CreateTreeNode("forumDashboard", id, queryStrings, "Forum item", "icon-truck", true);

            nodes.Add(item);
            return(nodes);
        }
        public void Filter(Umbraco.Web.Models.Trees.TreeNodeCollection nodes, out bool changesMade)
        {
            var toRemove = new List <TreeNode>();

            foreach (var node in nodes)
            {
                var n = node.Alias;
                if (_register.Registrations.Any(x => x.DataTypeInstanceName == node.Name && x.CodeFirstControlled))
                {
                    toRemove.Add(node);
                }
            }

            changesMade = toRemove.Count > 0;

            foreach (var node in toRemove)
            {
                nodes.Remove(node);
            }
        }
 /// <summary>
 /// Creates a section root node for a section with a single tree
 /// </summary>
 /// <param name="nodeId"></param>
 /// <param name="getChildNodesUrl"></param>
 /// <param name="menuUrl"></param>
 /// <param name="title"></param>
 /// <param name="children"></param>
 /// <param name="isSingleNodeTree"></param>
 /// <returns></returns>
 public static TreeRootNode CreateSingleTreeRoot(string nodeId, string getChildNodesUrl, string menuUrl, string title, TreeNodeCollection children, bool isSingleNodeTree = false)
 {
     return(new TreeRootNode(nodeId, getChildNodesUrl, menuUrl)
     {
         Children = children,
         Name = title,
         _isSingleNodeTree = isSingleNodeTree
     });
 }