Ejemplo n.º 1
0
        private SiteMapNode ChangeNewsMap(SiteMapResolveEventArgs siteMapResolveEventArgs)
        {
            SiteMapNode currentNode = null;

            try
            {
                currentNode = siteMapResolveEventArgs.Provider.FindSiteMapNode("~/Sitemap-News.aspx").Clone(true);
                News news = NewsManager.GetNewsByID(NewsId);
                if (news != null)
                {
                    currentNode.Url         = SEOHelper.GetNewsURL(news);
                    currentNode.Description = news.Title;
                    currentNode.Title       = news.Title;
                }
            }
            catch
            {
            }

            return(currentNode);
        }