/// <summary> /// Converts the ITreeNode into an SitemapNode with absolute Url. /// </summary> /// <param name="Node">The Node</param> /// <param name="SiteName">The SiteName</param> /// <returns>The SitemapNode</returns> public SitemapNode ConvertNodeToSiteMapUrl(TreeNode Node, string SiteName) { string Url = URLHelper.GetAbsoluteUrl(Node.RelativeURL, DocumentURLProvider.EnsureDomainPrefix(RequestContext.CurrentDomain, SiteName)); SitemapNode SiteMapItem = new SitemapNode(Url) { LastModificationDate = Node.DocumentModifiedWhen }; return(SiteMapItem); }
/// <summary> /// Converts the realtive Url and possible Datetime into an SitemapNode with an absolute Url /// </summary> /// <param name="RelativeURL">The Relative Url</param> /// <param name="SiteName">The SiteName</param> /// <param name="ModifiedLast">The last modified date</param> /// <returns>The SitemapNode</returns> private SitemapNode ConvertToSiteMapUrl(string RelativeURL, string SiteName, DateTime?ModifiedLast) { string Url = URLHelper.GetAbsoluteUrl(RelativeURL, DocumentURLProvider.EnsureDomainPrefix(RequestContext.CurrentDomain, SiteName)); SitemapNode SiteMapItem = new SitemapNode(Url); if (ModifiedLast.HasValue) { SiteMapItem.LastModificationDate = ModifiedLast; } return(SiteMapItem); }