예제 #1
0
 public ModuleUrlContext(PageRequestContext pageRequextContext, string moduleUrl, int moduleCount)
 {
     this.PageRequestContext = pageRequextContext;
     this.ModuleUrl = moduleUrl;
     this.ModuleCountInPage = moduleCount;
     ParseModuleRouteValues(moduleUrl);
 }
예제 #2
0
파일: Page_Context.cs 프로젝트: eyouyou/Bsc
        public void InitContext(PageRequestContext pageRequestContext, ControllerContext controllerContext)
        {
            this.PageRequestContext = pageRequestContext;
            this.ControllerContext = controllerContext;

            var page = pageRequestContext.Page.AsActual();
            this.PageLayout = page.Layout;
            if (page.EnableTheming)
            {
                this.PageTheme = pageRequestContext.Site.AsActual().Theme;
                if (string.IsNullOrEmpty(this.PageTheme))
                {
                    var themes = ServiceFactory.ThemeManager.GetDirectories(pageRequestContext.Site, "").ToArray();
                    if (themes.Length > 0)
                    {
                        this.PageTheme = themes.First().Name;
                    }
                }
            }

            // Enable by Model == Debug and url start with dev~
            this.EnableTrace = pageRequestContext.Site.Mode == ReleaseMode.Debug && pageRequestContext.RequestChannel == Web.FrontRequestChannel.Debug;

            this.Initialized = true;
        }
예제 #3
0
 internal static void OnResolvedPage(ControllerContext controllerContext, PageRequestContext pageRequestContext)
 {
     ExecuteModules((module) => module.OnResolvedPage(controllerContext, pageRequestContext));
 }