예제 #1
0
        private static void RegisterEditPageGet(RouteRegistrationEventArgs e, ExternalReviewOptions externalReviewOptions)
        {
            var routeValues = new RouteValueDictionary();

            routeValues.Add("controller", "PageEdit");
            routeValues.Add("action", "Index");
            routeValues.Add("token", " UrlParameter.Optional");

            var route = new Route(externalReviewOptions.ReviewsUrl + "/{token}", routeValues, new MvcRouteHandler());

            string[] allowedMethods    = { "GET" };
            var      methodConstraints = new HttpMethodConstraint(allowedMethods);

            route.Constraints = new RouteValueDictionary {
                { "httpMethod", methodConstraints }
            };

            e.Routes.Add(route);
        }
        private void Global_RoutesRegistrating(object sender, RouteRegistrationEventArgs e)
        {
            var routeValues = new RouteValueDictionary();

            routeValues.Add("controller", "FolderDownload");
            routeValues.Add("action", "Index");
            routeValues.Add("contentFolderIds", UrlParameter.Optional);

            const string baseUrl = "cms-content-folder-download";

            var route = new Route(baseUrl + "/{contentFolderIds}", routeValues, new MvcRouteHandler());

            string[] allowedMethods    = { "GET" };
            var      methodConstraints = new HttpMethodConstraint(allowedMethods);

            route.Constraints = new RouteValueDictionary {
                { "httpMethod", methodConstraints }
            };

            e.Routes.Add(route);
        }
예제 #3
0
 private void OnEpiserverRoutesRegistered(object sender, RouteRegistrationEventArgs routeRegistrationEventArgs)
 {
     RouteTable.Routes.MapSiteCategoryRoute("sitecategories", "{language}/{node}/{partial}/{action}", new { action = "index" }, sd => sd.SiteAssetsRoot);
     RouteTable.Routes.MapGlobalCategoryRoute("sharedcategories", "{language}/{node}/{partial}/{action}", new { action = "index" }, sd => sd.GlobalAssetsRoot);
 }
 private void Global_RoutesRegistered(object sender, RouteRegistrationEventArgs e)
 {
 }