Implemented much more of the new tree api structure. Have converted most of the content tree over to use it.

This commit is contained in:
Shannon
2013-07-30 13:29:05 +10:00
parent bf1f78e3aa
commit b3b2b5b9ee
23 changed files with 664 additions and 427 deletions

View File

@@ -50,10 +50,10 @@ namespace Umbraco.Web.Trees
instance.ControllerContext = controllerContext;
instance.Request = request;
//return the root
var nodes = instance.GetNodes(Constants.System.Root.ToString(CultureInfo.InvariantCulture), formCollection);
return nodes.Any() == false
var node = instance.GetRootNode(formCollection);
return node == null
? new Attempt<TreeNode>(new InvalidOperationException("Could not return a root node for tree " + appTree.Type))
: new Attempt<TreeNode>(true, nodes.First());
: new Attempt<TreeNode>(true, node);
}
internal static Attempt<TreeNodeCollection> TryLoadFromControllerTree(this ApplicationTree appTree, string id, FormDataCollection formCollection, HttpControllerContext controllerContext, HttpRequestMessage request)