Koi for DNN 7+
What you need to know
- skins can support Koi without requiring Koi to be installed - instructions here
- modules using Koi to be multi-framework should include Koi in their distribution package - so read on
- if you want to play with Koi, install it using the following instructions
Basics
- Installation: To Install Koi for the .net platform DNN just get the latest zip-installation package in the releases and install it like any DNN extension.
- Skin/Theme Configuration: Just add a koi.json file - follow the instructions here
Including Koi in your Module Distribution
As Koi is not part of DNN distributions, you’ll need to include it to be sure everything works. If you include it the correct way, DNN will automatically check if it’s already installed, and only install it if your package has a newer version. Here are two examples how to package it:
Example for Christoc’s DNN Module Template
If your module is based on a Christoc’s DNN Module template, follow these steps to add Koi:
- Download the latest release of Koi and unzip it
- Copy the /koi folder to your modules base folder [your module]
- Copy the /bin folder to [your module]/koi (the folder copied previously)
- Prevent the files in the Koi folder from being included in the Resources.zip of your own component. You can do this by modifying the itemgroup named InstallInclude. Add
koi\**
to the excluded files list, e.g.:Exclude="packages\**;koi\**"
- Open Connect_Dnn_Koi.dnn and copy the package node to your own .dnn manifest file
- Open ModulePackage.targets of your module and add the following lines before the comment saying “create the INSTALL RESOURCES.ZIP file”:
<!-- include koi folder -->
<ItemGroup>
<KoiFiles Include="$(MSBuildProjectDirectory)/koi/*.*" Exclude="**\*.dll" />
</ItemGroup>
<Copy SourceFiles="@(KoiFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\koi\%(RecursiveDir)" />
<ItemGroup>
<KoiDllFiles Include="$(MSBuildProjectDirectory)/koi/bin/*.dll" />
</ItemGroup>
<Copy SourceFiles="@(KoiDllFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin" />
Example When Adding Koi Manually
It is possible to manually add Koi to any existing DNN package. Though this is not recommended, it explains what the package must look like after including Koi.
- Extract the DNN extension
- Download the latest release of Koi and unzip it
- Copy the /koi and /bin folders from Koi to the extracted files of your extension
- Open Connect_Dnn_Koi.dnn and copy the package node to your own .dnn manifest file
- Zip the files again and test the package