private static void LoadNodes(CompositeC1SiteMapProvider provider, PageNode pageNode, SiteMapNode parent, SiteMapContainer container, DataConnection data, int level) { if (pageNode.Url == null) { return; } var node = new CompositeC1SiteMapNode(provider, pageNode, data, level); AddNode(node, parent, container); var childs = pageNode.ChildPages; foreach (var child in childs) { LoadNodes(provider, child, node, container, data, level + 1); } }
/// <summary> /// Initializes a new instance of the <see cref="CompositeC1SiteMapNode"/> class. /// </summary> /// <param name="provider">The provider.</param> /// <param name="node">The node.</param> /// <param name="data">The data.</param> /// <param name="level">The level of the page.</param> public CompositeC1SiteMapNode(CompositeC1SiteMapProvider provider, PageNode node, DataConnection data, int level) : base(provider, node.Id.ToString(), node.Url, node.MenuTitle, node.Description) { DocumentTitle = node.Title; Depth = level; LastModified = node.ChangedDate; Priority = 5; PageNode = node; Culture = data.CurrentLocale; }
/// <summary> /// Initializes a new instance of the <see cref="CompositeC1SiteMapNode"/> class. /// </summary> /// <param name="provider">The provider.</param> /// <param name="node">The node.</param> /// <param name="data">The data.</param> public CompositeC1SiteMapNode(CompositeC1SiteMapProvider provider, PageNode node, DataConnection data) : this(provider, node, data, node.Level) { }