一、建立一个MVC的项目:

二、添加Description.txt文件

其中,Group表示插件是属于哪一组。

FriendlyName:插件的名称

SystemName:插件的唯一标示

FileName:插件所在的dll

三、添加RouteProvider.cs文件

public partial class RouteProvider : IRouteProvider
    {
        public void RegisterRoutes(RouteCollection routes)
        {
            routes.MapRoute("Plugin.PromotionRules.CustomerArea.Configure",
                 "Plugins/PromotionRulesCustomerArea/Configure",
                 new { controller = "PromotionRulesCustomerArea", action = "Configure" },
                 new[] { "Nop.Plugin.PromotionRules.CustomerArea.Controllers" }
            );
        }
        public int Priority
        {
            get
            {
                return 0;
            }
        }
    }
View Code

主要是配置相关的路由。

 

下一篇再讲插件的开发。

posted on 2015-08-12 20:43  大波哥  阅读(553)  评论(0编辑  收藏  举报