2012-02-24 59 views
4

當nopcommerce 2.4.0運行,我得到的鏈接是localhost:7725/c/2/computers代替localhost:7725/categories/2/computersnopcommerce MVC路線說明

我不知道哪裏是代碼轉換類別ç

請幫助我通過nopcommerce學習MVC。

回答

7
  1. 打開\Presentation\Nop.Web\Infrastructure\RouteProvider.cs文件
  2. 查找
 
routes.MapLocalizedRoute("Category", 
       "**c**/{categoryId}/{SeName}", 
       new { controller = "Catalog", action = "Category", SeName = UrlParameter.Optional }, 
       new { categoryId = @"\d+" }, 
       new[] { "Nop.Web.Controllers" }); 

routes.MapLocalizedRoute("Category", 
          "categories/{categoryId}/{SeName}", 
          new { controller = "Catalog", action = "Category", SeName = UrlParameter.Optional }, 
          new { categoryId = @"\d+" }, 
          new[] { "Nop.Web.Controllers" }); 

3.更換它做幾乎同樣的\Libraries\Nop.Services\Seo\SitemapGenerator.cs文件(替換{0}c/{1}/{2}{0}categories/{1}/{2}

+0

感謝高級 – Green 2012-02-27 14:22:23

+0

謝謝你想弄清楚所有的路線都在NopCommerce – 2013-07-30 08:03:40