Пример #1
0
        public bool TryMvcSupport(int segmentPosition, string[] segments, PageIndexItem page)
        {
            if (page.PageId == Guid.Empty)
            {
                return(false);
            }

            try {
                var parametersCount = segments.Length - segmentPosition - 1;
                var parameters      = new string[parametersCount];
                Array.Copy(segments, segmentPosition + 1, parameters, 0, parametersCount);
                var cmsPage = new CmsPage(page, Language.CurrentLanguageId);
                RequestModule.RedirectToControllerAction(cmsPage, parameters);

                return(true);
            }
            catch (Exception exception) {
                Logger.Write(exception, Logger.Severity.Info);
                return(false);
            }
        }
Пример #2
0
 public void PreviewPage(CmsPage page)
 {
     RequestModule.RedirectToController(page, "index", null, true);
 }
Пример #3
0
        public void HandlePage(PageIndexItem page)
        {
            var cmsPage = new CmsPage(page, Language.CurrentLanguageId);

            RequestModule.RedirectToController(cmsPage);
        }
Пример #4
0
 public void HandlePage(CmsPage page)
 {
     RequestModule.RedirectToController(page);
 }
Пример #5
0
 public static void RedirectToController(CmsPage page, string actionName = "index", Dictionary <string, object> additionalRouteData = null)
 {
     RequestModule.RedirectToController(page, actionName, additionalRouteData);
 }