public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( this.GetType().Namespace + "_" + ModuleName + "_default", ModuleName + "/{controller}/{action}", new { controller = "Admin", action = "Index" } , null , new[] { "KoobooModule.Areas.KoobooModule.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); var areaPath = AreaHelpers.CombineAreaFilePhysicalPath(AreaName); if (Directory.Exists(areaPath)) { var menuFile = AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "CMSMenu.config"); if (File.Exists(menuFile)) { Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, menuFile); } var globalMenuFile = AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "GlobalMenu.config"); if (File.Exists(globalMenuFile)) { Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(Kooboo.CMS.Sites.Extension.UI.GlobalSidebarMenu.ModuleGlobalSidebarMenuItemProvider.GetGlobalSidebarMenuTemplateName(AreaName), globalMenuFile); } var resourceFile = Path.Combine(Settings.BaseDirectory, "Areas", AreaName, "WebResources.config"); if (File.Exists(resourceFile)) { Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, resourceFile); } } }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Membership_default", "Membership/{controller}/{action}", new { controller = "Membership", action = "Index" } , new[] { "Kooboo.CMS.Web.Areas.Membership.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "Menu.config")); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "WebResources.config")); #region RegisterPermissions var roleManager = Kooboo.CMS.Common.Runtime.EngineContext.Current.Resolve <RoleManager>(); roleManager.AddPermission(new Permission() { AreaName = "Membership", Group = "", Name = "Setting" }); roleManager.AddPermission(new Permission() { AreaName = "Membership", Group = "", Name = "Group" }); roleManager.AddPermission(new Permission() { AreaName = "Membership", Group = "", Name = "Member" }); roleManager.AddPermission(new Permission() { AreaName = "Membership", Group = "", Name = "Connect" }); #endregion base.RegisterArea(context); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( ModuleName + "_default", ModuleName + "/{controller}/{action}", new { controller = "Admin", action = "Index" } , null , new[] { "Kooboo.CMS.ExtensionTemplate.Areas.ProductModule.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); var areaPath = AreaHelpers.CombineAreaFilePhysicalPath(AreaName); if (Directory.Exists(areaPath)) { var menuFile = AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "CMSMenu.config"); if (File.Exists(menuFile)) { Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, menuFile); } var resourceFile = Path.Combine(Settings.BaseDirectory, "Areas", AreaName, "WebResources.config"); if (File.Exists(resourceFile)) { Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, resourceFile); } } }
public override void RegisterArea(AreaRegistrationContext context) { //var metaweblogRoute = new Route("Contents/metaweblog", null, null, new MetaWeblogRouteHandler()); //context.Routes.Add(metaweblogRoute); context.MapRoute( "Contents_default", "Contents/{controller}/{action}",///{repositoryName}/{name} new { action = "Index" } , null , new[] { "Kooboo.CMS.Web.Areas.Contents.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "Menu.config")); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "WebResources.config")); #region RegisterPermissions var roleManager = Kooboo.CMS.Common.Runtime.EngineContext.Current.Resolve <RoleManager>(); roleManager.AddPermission(Permission.Contents_SettingPermission); roleManager.AddPermission(Permission.Contents_SchemaPermission); roleManager.AddPermission(Permission.Contents_FolderPermission); roleManager.AddPermission(Permission.Contents_ContentPermission); roleManager.AddPermission(Permission.Contents_BroadcastingPermission); roleManager.AddPermission(Permission.Contents_WorkflowPermission); roleManager.AddPermission(Permission.Contents_SearchSettingPermission); roleManager.AddPermission(Permission.Contents_HtmlBlockPermission); #endregion base.RegisterArea(context); }
public override void RegisterArea(AreaRegistrationContext context) { /* * context.MapRoute( * "Commerce_default", * "Commerce/{controller}/{action}/{id}", * new { action = "Index", id = UrlParameter.Optional } * );*/ context.MapRoute( AreaName + "_default", AreaName + "/{controller}/{action}", new { controller = "Home", action = "Index" } , null , new[] { "Kooboo.Commerce.Web.Controllers", "Kooboo.Commerce.Web.Areas.Commerce.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); var menuFile = AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "Menu.config"); if (File.Exists(menuFile)) { Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, menuFile); } var resourceFile = Path.Combine(Settings.BaseDirectory, "Areas", AreaName, "WebResources.config"); if (File.Exists(resourceFile)) { Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, resourceFile); } }
public override void RegisterArea(AreaRegistrationContext context) { // Register module menu string menuFilePath = AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "Menu.config"); MenuFactory.RegisterAreaMenu(AreaName, menuFilePath); // Register module web resources string webResourcesFilePath = Path.Combine(Settings.BaseDirectory, "Areas", AreaName, "WebResources.config"); ConfigurationManager.RegisterSection(AreaName, webResourcesFilePath); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Account_default", "Account/{controller}/{action}/{id}", new { controller = "LogOn", action = "Index", id = UrlParameter.Optional } , null , new[] { "Kooboo.CMS.Web.Areas.Account.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "Menu.config")); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, Path.Combine(Settings.BaseDirectory, "Areas", AreaName, "WebResources.config")); }
public override void RegisterArea(AreaRegistrationContext context) { //var metaweblogRoute = new Route("Contents/metaweblog", null, null, new MetaWeblogRouteHandler()); //context.Routes.Add(metaweblogRoute); context.MapRoute( "Contents_default", "Contents/{controller}/{action}",///{repositoryName}/{name} new { action = "Index" } , null , new[] { "Kooboo.CMS.Web.Areas.Contents.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "Menu.config")); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "WebResources.config")); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( ModuleName + "_default", ModuleName + "/{controller}/{action}", new { action = "Index" } , null , new[] { "Kooboo.CMS.ExtensionTemplate.Areas.BlogModule.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); var areaPath = AreaHelpers.CombineAreaFilePhysicalPath(AreaName); if (Directory.Exists(areaPath)) { var menuFile = AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "CMSMenu.config"); if (File.Exists(menuFile)) { Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, menuFile); } var resourceFile = Path.Combine(Settings.BaseDirectory, "Areas", AreaName, "WebResources.config"); if (File.Exists(resourceFile)) { Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, resourceFile); } ModuleInfo moduleInfo = ModuleInfo.Get(ModuleAreaRegistration.ModuleName); if (moduleInfo.DefaultSettings.CustomSettings.ContainsKey("ConnectionString")) { BlogDbContext.DefaultConnectionString = moduleInfo.DefaultSettings.CustomSettings["ConnectionString"]; } #region RegisterPermissions var roleManager = Kooboo.CMS.Common.Runtime.EngineContext.Current.Resolve <RoleManager>(); roleManager.AddPermission(new Permission() { AreaName = "Blog", Group = "", Name = "Blog" }); roleManager.AddPermission(new Permission() { AreaName = "Blog", Group = "", Name = "Category" }); #endregion } }
public override void RegisterArea(AddinAreaRegistrationContext context) { context.MapRoute( name: AreaName + "_default", url: AreaName + "/{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, namespaces: new[] { "Kooboo.Commerce.Multilingual.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "WebResources.config")); MapperConfiguration.Configure(); SqlceConfiguration.Configure(); }
public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context) { context.MapRoute( name: AreaName + "_default", url: AreaName + "/{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, namespaces: new[] { "Kooboo.Commerce.Shipping.ByWeight.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "WebResources.config")); base.RegisterArea(context); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Publishing_default", "Publishing/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, new[] { "Kooboo.CMS.Modules.Publishing.Web.Areas.Publishing.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, Path.Combine(Settings.BaseDirectory, "Areas", AreaName, "Menu.config")); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "WebResources.config")); base.RegisterArea(context); #region RegisterPermissions var roleManager = Kooboo.CMS.Common.Runtime.EngineContext.Current.Resolve <RoleManager>(); roleManager.AddPermission(Publishing_Local_Queue); roleManager.AddPermission(Publishing_Remote_RemoteSites); roleManager.AddPermission(Publishing_Remote_TextFolderMapping); roleManager.AddPermission(Publishing_Remote_Queue); roleManager.AddPermission(Publishing_Remote_Incoming); //roleManager.AddPermission(Permission.Publishing_Remote_Cmis); roleManager.AddPermission(Publishing_Local_Logs); #endregion }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( AreaName, AreaName + "/{controller}/{action}", new { action = "Index" } , null , new[] { "Kooboo.Modules.EventsExplorer.Controllers", "Kooboo.Web.Mvc", "Kooboo.Web.Mvc.WebResourceLoader" } ); //Kooboo.Web.Mvc.Menu.MenuFactory.RegisterAreaMenu(AreaName, AreaHelpers.CombineAreaFilePhysicalPath(AreaName, "Menu.config")); Kooboo.Web.Mvc.WebResourceLoader.ConfigurationManager.RegisterSection(AreaName, AreaHelpers.CombineAreaFilePhysicalPath("Sites", "WebResources.config")); base.RegisterArea(context); }