Exemple #1
0
        protected void Application_Start()
        {
            cmsHost = CmsContext.RegisterHost();

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            RouteConfig.RegisterRoutes(RouteTable.Routes);

            cmsHost.OnApplicationStart(this);

            AddCategoryEvents();
            AddContentEvents();
            AddLayoutEvents();
            AddPageEvents();
            AddRedirectEvents();
            AddSitemapEvents();
            AddTagEvents();
            AddWidgetEvents();
            AddLanguageEvents();
            AddBlogPostEvents();
            AddBlogAuthorEvents();
            AddMediaManagerEvents();
            AddUsersEvents();
            AddNewsletterEvents();
        }
Exemple #2
0
        protected void Application_Start()
        {
            RouteTable.Routes.MapRoute(
                name: "Default",
                url: "demo/{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );

            cmsHost = CmsContext.RegisterHost();

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            RouteConfig.RegisterRoutes(RouteTable.Routes);

            cmsHost.OnApplicationStart(this);

            AddPageEvents();
            AddSitemapEvents();
            AddRedirectEvents();
            AddTagEvents();
            AddCategoryEvents();
            AddWidgetEvents();
            AddBlogPostEvents();
            AddBlogAuthorEvents();
            AddMediaManagerEvents();
            AddUsersEvents();
        }
Exemple #3
0
        protected void Application_Start()
        {
            RouteTable.Routes.MapRoute(
                                 name: "Default",
                                 url: "demo/{controller}/{action}/{id}",
                                 defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                             ); 

            cmsHost = CmsContext.RegisterHost();

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            RouteConfig.RegisterRoutes(RouteTable.Routes);

            cmsHost.OnApplicationStart(this);

            AddCategoryEvents();
            AddContentEvents();
            AddLayoutEvents();
            AddPageEvents();
            AddRedirectEvents();
            AddSitemapEvents();
            AddTagEvents();
            AddWidgetEvents();
            AddLanguageEvents();
            AddBlogPostEvents();
            AddBlogAuthorEvents();
            AddMediaManagerEvents();
            AddUsersEvents();
            AddNewsletterEvents();
        }
        protected void Application_Start()
        {
            cmsHost = CmsContext.RegisterHost();
            //            RouteConfig.RegisterRoutes(RouteTable.Routes);

            cmsHost.OnApplicationStart(this);
        }
Exemple #5
0
        protected void Application_Start()
        {
            cmsHost = CmsContext.RegisterHost();
            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            RouteConfig.RegisterRoutes(RouteTable.Routes);

            AddCategoryEvents();
            AddContentEvents();
            AddLayoutEvents();
            AddPageEvents();
            AddRedirectEvents();
            AddSitemapEvents();
            AddTagEvents();
            AddWidgetEvents();
            AddLanguageEvents();
            AddBlogPostEvents();
            AddBlogAuthorEvents();
            AddMediaManagerEvents();
            AddUsersEvents();
            AddNewsletterEvents();
            cmsHost.OnApplicationStart(this);
        }
 protected void Application_Start()
 {
     cmsHost = CmsContext.RegisterHost();
     AreaRegistration.RegisterAllAreas();
     WebApiConfig.Register(GlobalConfiguration.Configuration);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     cmsHost.OnApplicationStart(this);
 }
Exemple #7
0
        protected void Application_Start()
        {
            RouteTable.Routes.MapRoute(
                                 name: "Default",
                                 url: "demo/{controller}/{action}/{id}",
                                 defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                             ); 

            cmsHost = CmsContext.RegisterHost();

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            RouteConfig.RegisterRoutes(RouteTable.Routes);

            cmsHost.OnApplicationStart(this);


// NOTE:
//            Module.Pages.Helpers.UrlHelper.GeneratePageUrl = request =>
//                {
//                    using (var api = Module.Api.ApiFactory.Create())
//                    {
//                        // TODO: implement custom logic.
//                        return
//                            string.Format(
//                                "/language-{0}/category-{1}/parent-{2}/{3}",
//                                request.LanguageId.HasValue && request.LanguageId != default(Guid)
//                                    ? api.Root.Language.Get(new GetLanguageRequest { LanguageId = request.LanguageId }).Data.Code.Transliterate(true)
//                                    : request.LanguageId.ToString(),
//                                request.CategoryId.HasValue && request.CategoryId != default(Guid)
//                                    ? api.Root.Category.Get(new GetCategoryRequest { CategoryId = request.CategoryId }).Data.Name.Transliterate(true)
//                                    : request.CategoryId.ToString(),
//                                request.ParentPageId,
//                                request.Title.Transliterate(true)).ToLowerInvariant();
//                    }
//
//                    return null; // use default cms behavior.
//                };


            AddCategoryEvents();
            AddContentEvents();
            AddLayoutEvents();
            AddPageEvents();
            AddRedirectEvents();
            AddSitemapEvents();
            AddTagEvents();
            AddWidgetEvents();
            AddLanguageEvents();
            AddBlogPostEvents();
            AddBlogAuthorEvents();
            AddMediaManagerEvents();
            AddUsersEvents();
            AddNewsletterEvents();
        }
 protected void Application_Start()
 {
     cmsHost = CmsContext.RegisterHost();
     AreaRegistration.RegisterAllAreas();
     WebApiConfig.Register(GlobalConfiguration.Configuration);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     cmsHost.OnApplicationStart(this);
 }
Exemple #9
0
        protected void Application_Start()
        {
            cmsHost = CmsContext.RegisterHost();

            /* DO NOT FORGET TO REMOVE DEFAULT ROUTE REGISTRATION!
             * FOLLOWING SOURCE CODE SHOULD BE REMOVED:
             *
             * routes.MapRoute(
             *          name: "Default",
             *          url: "{controller}/{action}/{id}",
             *          defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
             *      );
             */

            // [YOUR CODE]

            cmsHost.OnApplicationStart(this);
            //AreaRegistration.RegisterAllAreas();
            //FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            //RouteConfig.RegisterRoutes(RouteTable.Routes);
            //BundleConfig.RegisterBundles(BundleTable.Bundles);
            AddCategoryEvents();
            AddContentEvents();
            AddLayoutEvents();
            AddPageEvents();
            AddRedirectEvents();
            AddSitemapEvents();
            AddTagEvents();
            AddWidgetEvents();
            AddLanguageEvents();
            AddBlogPostEvents();
            AddBlogAuthorEvents();
            AddMediaManagerEvents();
            AddUsersEvents();
            AddNewsletterEvents();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SidebarController" /> class.
 /// </summary>
 /// <param name="modulesRegistration">The modules.</param>
 /// <param name="pageAccessor">The page extensions.</param>
 /// <param name="cmsHost">The contract for BetterCMS application host.</param>
 public SidebarController(IModulesRegistration modulesRegistration, IPageAccessor pageAccessor, ICmsHost cmsHost)
 {
     this.cmsHost = cmsHost;
     this.modulesRegistration = modulesRegistration;
     this.pageAccessor = pageAccessor;
 }