예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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);
        }