• Documentation

    Elanat Documentation
    The most important feature of Elanat is its add-ons-oriented structure. Add-ons-oriented structure allows you to create your own Add-ons without conflicting with Eanat core.

    Add-on - Creating plugin for Elanat under ASP.NET Core

    To create an add-on for Elanat, just fill in an xml catalog file. The following steps are related to programming in the .NET environment, which even beginner programmers should master.

    Introduction

    What is plugin? Add-ons that are purely visual and do not have a management page are called plugins.

    This tutorial is for Elanat framework version 2, which is implemented with .NET Core 7.0.

    You need to add CodeBehind package from nuget in your plugin project.

    Plugins are placed in Elanat in wwwroot/add_on/plugin/yourplugin; your plugin will be automatically added to the directory you specify. This notification was for you to know about the path of your plugin!


    Step 1: Create empty project

    Create an empty ASP.NET Core 7.0 project then add CodeBehind nuget package

    You can access CodeBehind in the following link:

    https://www.nuget.org/packages/CodeBehind


    Step 2: Create Model and View and Controller

    View page file

    Controller class file

    Model class file

    Program.cs class file


    Step 3: Download raw add-on file of the plugin

    The below link is the raw add-on file of the plugin:

    https://elanat.net/upload/english_presentation_download_center/plugin.zip


    Step 4: Publish your project

    First, extract the zip file; after extracting the zip file, you will see two directories; in the directory with the same name as the Add-on type, delete the index.html file and add your executable file in this directory. You can add as many files as you want in the Elanat path in the root directory.

    Place the project dll file in the bin directory in the root directory. Note that there is no need to add CodeBehind.dll and you only need to add your project dll file along with the dlls you used in the project.

    Step 5: Fill catalog.xml file

    In the directory with the same name as the add-on type, open the catalog.xml file for editing and change or add the necessary values such as add-on name, add-on path, add-on executable file name, etc. Finally, create a zip file containing the directory with the same name as the add-on type and the root directory.


    Notes:

    - Note that you will only have two directories in the final zip file; one is the directory with the same name as the add-on type (if your project is a plugin, it is a plugin, if it is a module, it is a module, if it is an extra helper, it is extra_hepler, etc.) in which you have placed the catalog file along with other files such as Default.aspx ; the other is the root directory, where there should be a directory called bin to place the main dll file of the project, and other files and directories added to the root directory will all be copied to the root of the program.

    - The xml catalog file includes more features and you can use all the features of this file to create powerful add-ons.

    - When adding a add-on to Elanat, the CodeBehind framework will recompile all aspx pages and this process may take some time.


    To test the project, the Program.cs class should look like this: