我想在 nop2.65 中设置不同的默认页面,我已经注册了新的 Route
//In RouteProvider
//Custome page
routes.MapLocalizedRoute("CustomHome",
"",
new { controller = "Customer", action = "Login" },
new[] { "Nop.Web.Controllers" });
//home page
routes.MapLocalizedRoute("HomePage",
"",
new { controller = "Home", action = "Index" },
new[] { "Nop.Web.Controllers" });
将登录页面设置为默认设置很好,但是当我单击“主页”菜单时,它会重定向登录页面而不是主页。
我也尝试在 Global.asax 文件中设置默认页面,该页面也不起作用
//In Global.asax file
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Customer", action = "Login", id = UrlParameter.Optional },
new[] { "Nop.Web.Controllers" }
);