Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- localhost:2276/Admin/Category/List
- localhost:2276/Plugin/Category/List
- public partial class RouteProvider : IRouteProvider
- {
- public void RegisterRoutes(RouteCollection routes)
- {
- routes.MapRoute("Nop.Plugin.Category.ShopByCategory.Views.Category.List",
- "Admin/Category/List",
- new { controller = "Category", action = "List" },
- new[] { "Nop.Plugin.Category.ShopByCategory.Controllers" });
- }
- public int Priority
- {
- get { return 0; }
- }
- }
- public override void RegisterArea(AreaRegistrationContext context)
- {
- context.MapRoute(
- "Admin_default",
- "Admin/{controller}/{action}/{id}",
- new { controller = "Home", action = "Index", area = "Admin", id = "" },
- new[] { "Nop.Admin.Controllers" }
- );
- }
- public partial class RouteProvider : IRouteProvider
- {
- public void RegisterRoutes(RouteCollection routes)
- {
- routes.MapRoute("Nop.Plugin.Category.ShopByCategory.Views.Category.List",
- "Category/List",
- new { controller = "Category", action = "List" },
- new[] { "Nop.Plugin.Category.ShopByCategory.Controllers" });
- }
- public int Priority
- {
- get { return 0; }
- }
- }
- var route = routes.MapRoute(RouteName,
- "admin/Plugins/PluginName/ControllerName/ActionName",
- new { controller = "ControllerName", action = "ActionName" },
- new[] { TheNamespaceOfControllerClass }
- );
- route.DataTokens.Add("area", "admin");
Add Comment
Please, Sign In to add comment