Creating a plugin
  • Add a new project
  • Make sure the assembly name and default namespace start's with "Plugin"
  • All controller's HAVE to inherit from "MVCms.Core.Developers.BaseController"
  • Decorate all PartialViews with the "MVCms.Core.Developers.PluginModuleAttribute" attribute
    • suipply Name, DisplayName, Description, PostController, PostAction info on attribute
      • PostController is the controller it will post to (optional- but will be used in future)
      • PostAction is the action it will post to (optional- but will be used in future)
  • Make sure all views returned are PartialViews
  • In you solution explorer, set the build action on the view <VIEW_NAME>.ascx to Embedded Resource 
  • In your Global.asax.cs file make sure your default route, or any other route you map has your assembly name included
    • example: routes.MapRoute("Default", // Route name"{controller}/{action}/{id}", // URL with parameters 
      new { controller = "Home", action = "Index", 
      id = UrlParameter.Optional }, // Parameter defaults 
      new string[] { "<YOUR_DEFAULT_NAMESPACE>.Controllers" } //Avoid Confusion with plugins
      );
  • Once finished, compile your application
  • Open your browser and go to your implementation of MVCms, and in admin go to upload plugin
  • Make sure to upload your compiled "dll as well as other referenced dlls.
  • Once uploaded, you can add your module to any page and try it out

Last edited Sep 11, 2010 at 11:19 AM by polemus, version 1

Comments

No comments yet.