Skip to content

How to create custom module

coreframework edited this page Sep 15, 2011 · 2 revisions

To implement custom module:

  1. Create new MVC project.

  2. Add <You_module_name>.cs class.

  3. <You_module_name>.cs class should implement ICorePlugin interface. Inherit from BasePlugin class to get basic implementation.

  4. Add [Export(typeof(ICorePlugin))] attribute to the class. It's necessary to automatically pick up module on the fly.

  5. Create plugin's config xml file and set the path in <You_module_name> class.

An example of the config:

<?xml version="1.0" encoding="utf-8" ?>
<PluginSetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Identifier>0</Identifier>
  <Title>Informational Pages</Title>
  <ResourcesDirectory>Resources</ResourcesDirectory>
  <Description>Allow managing Content Pages.</Description>
  <CssJsConfigPath>Config\asset_packages.yml</CssJsConfigPath>
  <JsPath>Scripts\</JsPath>
  <WidgetSettings>
	<WidgetSetting>
	  <Key>Core.ContentPages.Widgets.ContentViewerWidget</Key>
	  <Identifier>123456</Identifier>
	  <Title>Web Content</Title>
	</WidgetSetting>
  </WidgetSettings>
</PluginSetting>
  1. If you wish your module support permissions you need to add IPermissible implementation and add **[Export(typeof(IPermissible))] ** attribute

Clone this wiki locally