예제 #1
0
        protected virtual CMSPageDefaultController initPageController()
        {
            CMSPageDefaultController pageController = new CMSPageDefaultController();

            pageController.init(this.Request.RequestContext);
            //change route data, otherwise mvc 404 page will not have view applied, since it will not be able to load view
            pageController.ControllerContext.RouteData.Values["controller"] = "CMSPageDefault";
            pageController.ControllerContext.RouteData.Values["action"]     = "Index";
            return(pageController);
        }
예제 #2
0
        protected virtual CMSPageDefaultController initPageController()
        {
            CMSPageDefaultController pageController = new CMSPageDefaultController();

            pageController.init(this.Request.RequestContext);
            //change route data, otherwise mvc 404 page will not have view applied, since it will not be able to load view
            pageController.ControllerContext.RouteData.Values["controller"] = ConfigurationManager.AppSettings["BaseControllerName"]
                                                                              .ToNullOrEmptyHelper()
                                                                              .Return("CMSPageDefault");
            pageController.ControllerContext.RouteData.Values["action"] = "Index";
            return(pageController);
        }