Exemple #1
0
        public TreeNode GetRootNode(FormDataCollection queryStrings)
        {
            if (queryStrings == null)
            {
                queryStrings = new FormDataCollection("");
            }
            var node = CreateRootNode(queryStrings);

            //add the tree alias to the root
            node.AdditionalData["treeAlias"] = _treeAlias;

            AddQueryStringsToAdditionalData(node, queryStrings);

            //check if the tree is searchable and add that to the meta data as well
            if (this is ISearchableTree)
            {
                node.AdditionalData.Add("searchable", "true");
            }

            //now update all data based on some of the query strings, like if we are running in dialog mode
            if (IsDialog(queryStrings))
            {
                node.RoutePath = "#";
            }

            TreeControllerBase.OnRootNodeRendering(null, new TreeNodeRenderingEventArgs(node, queryStrings));

            return(node);
        }