-
Notifications
You must be signed in to change notification settings - Fork 0
How to create custom module
coreframework edited this page Sep 15, 2011
·
2 revisions
To implement custom module:
-
Create new MVC project.
-
Add <You_module_name>.cs class.
-
<You_module_name>.cs class should implement ICorePlugin interface. Inherit from BasePlugin class to get basic implementation.
-
Add [Export(typeof(ICorePlugin))] attribute to the class. It's necessary to automatically pick up module on the fly.
-
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>
- If you wish your module support permissions you need to add IPermissible implementation and add **[Export(typeof(IPermissible))] ** attribute