private string GetUrlForTreeNode(ContentTreeNode contentTreeNode) { var segments = contentTreeNode.GetPath(); var sb = new StringBuilder(); for(var n = 0; n < segments.Count(); n++) { sb.Append(segments[n]); if (n < segments.Count() - 1) sb.Append("/"); } return sb.ToString(); }
private RouteData GetRouteData(ContentTreeNode treeNode) { var routeData = new RouteData(this, RouteHandler); var segments = treeNode.GetPath(); for (var i = 0; i < segments.Length; i++) routeData.Values.Add(i.ToString(), segments[i]); routeData.Values.Add("TreeNodeId", treeNode.TreeNodeId); routeData.Values.Add("ActionId", treeNode.ActionId); routeData.Values.Add("action", treeNode.Action); routeData.Values.Add("controller", treeNode.Controller); return routeData; }