RenderSiteMap() public method

public RenderSiteMap ( HttpContext context ) : void
context System.Web.HttpContext
return void
Esempio n. 1
0
        public void ProcessRequest(HttpContext context)
        {
            string sFileRequested = context.Request.Path;

            if (sFileRequested.ToLower().EndsWith("/rss.ashx")) {
                SiteData.CurrentSite.RenderRSSFeed(context);
            }

            if (sFileRequested.ToLower().EndsWith("/sitemap.ashx")) {
                SiteMapHelper smh = new SiteMapHelper();
                smh.RenderSiteMap(context);
            }

            if (sFileRequested.ToLower().EndsWith("/trackback.ashx")) {
                TrackbackHelper tbh = new TrackbackHelper();
                if (SiteData.CurretSiteExists) {
                    if (SiteData.CurrentSite.AcceptTrackbacks) {
                        tbh.ProcessTrackback(context, true);
                    } else {
                        tbh.GenerateTrackBackDisabled(context);
                    }
                }
            }

            context.Response.End();
        }
Esempio n. 2
0
        public void ProcessRequest(HttpContext context)
        {
            string sFileRequested = context.Request.Path;

            if (sFileRequested.ToLowerInvariant().EndsWith("/rss.ashx"))
            {
                SiteData.CurrentSite.RenderRSSFeed(context);
            }

            if (sFileRequested.ToLowerInvariant().EndsWith("/sitemap.ashx"))
            {
                SiteMapHelper smh = new SiteMapHelper();
                smh.RenderSiteMap(context);
            }

            if (sFileRequested.ToLowerInvariant().EndsWith("/trackback.ashx"))
            {
                TrackbackHelper tbh = new TrackbackHelper();
                if (SiteData.CurretSiteExists)
                {
                    if (SiteData.CurrentSite.AcceptTrackbacks)
                    {
                        tbh.ProcessTrackback(context, true);
                    }
                    else
                    {
                        tbh.GenerateTrackBackDisabled(context);
                    }
                }
            }

            context.Response.End();
        }