public ModuleUrlContext(PageRequestContext pageRequextContext, string moduleUrl, int moduleCount) { this.PageRequestContext = pageRequextContext; this.ModuleUrl = moduleUrl; this.ModuleCountInPage = moduleCount; ParseModuleRouteValues(moduleUrl); }
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; }
internal static void OnResolvedPage(ControllerContext controllerContext, PageRequestContext pageRequestContext) { ExecuteModules((module) => module.OnResolvedPage(controllerContext, pageRequestContext)); }