Module development

Sheet: Module development (for version 4.2 or lower)

Steps

Description

Remarks

Setup the project

1.       Use the VS.NET Kooboo extension template
Download and install the VS.NET template from kooboo.codeplex.com. Setup a project using the VS.NET template.

 

2.       Rename your module from the default “Empty” module.
Module is a MVC area, default located at “areas/empty”
Rename the “Empty” folder to your module name.
Rename in these files: ModuleEvents.cs, ModuleAreaRegistration.cs, routes.config

3.       Alternative to Rename
In the created VS.NET project, create a new area and copy the following files “area/samplemodule” into it: routes.config, moduleevents.cs, modulearearegistration.cs (optional)

Development

4.       Controllers and views
you are free to use all .NET class library and MVC protocol, except bellows.
- Configure your controller action routing on routes.config
- Use partial views
- Use @Url.ModuleUrl().Action("") and  @Html.ModuleHtml().ActionLink("")

 

5.       Debug
- Run the module project, it is a standard kooboo CMS site.
- Include the module into one of the websites.
- Create a page in the website and insert module into that page.
- Start debugging in the VS.NET using code breaks, etc.

Deployment

1.       Publish
Use VS.NET publish function to publish the project to disk file location.

 

2.       Package
- Copy the generated dlls and reference third party dlls from “/bin” folder to          “/area/{modulefoldername}/bin folder.
Option to configure module.config and cmsmenu.config
- zip all the files as a standalone .zip file

Or in the module folder, find the file “PackModule.bat”, click to pack your module.  

Your module is now ready to be installed.

.

Use the module

1.       Installation
Login to the system as an administrator (default is admin)

Navigate to module page and click “install” to install the module.

 

2.       Use the module

- Go to the website that needs this module, in the extension/module menu, click “include” to include this module into the website.

- In the website page, open the page designer and insert the module into the right position.