Steps in brief
- Install DNN extension for Visual Studio
- Create a custom module using Visual Studio
- Install the module in Evoq site
- Add module in any Evoq page
Install DNN Extension for Visual Studio
To create any custom module using Visual Studio we first need to install the extension which will be needed to create a project for DNN.
To install the extension for VS we have two options
- Using Visual Studio extensions
- Open the Tools option from the Visual Studio menu
- Select Extensions and Updates
- Search DNN in the search bar after selecting the Online option from the ribbon on the left-hand side.
- Click on the install option after the option (install option will appear in the extension is not already installed)
- Downloading the .msi file and installing it,
- Download the .msi file from the given link
- Install the file in your system
Create a custom module using Visual Studio
- Open Visual as Administrator
- Create a new project in Visual Studio
- Select DNN from the menu on the Left-hand Side and select the option C# Compiled Module to create a custom module.
- Keep in mind the below-listed points while creating the solution,
- Give the name to the module
- Uncheck the option create the directory for the solution
- Uncheck the option Add to source control
- Set the path for the project in the DesktopModules folder of the website
- Popup, as shown below, will appear on clicking Enter the details in the popup. And Click on Ok.
- The page will open which will show some steps necessary for developing the custom module. The file structure of the project for creating the module will be as shown.
View.ascx and view.ascx.cs file will be necessary for development of basic module. Other files such as Edit.ascx, Edit.ascx.cs, Settings.ascx and Settings.ascx.cs files can be useful for development of Advance module.
- Read and follow the instructions given in the visual studio and make the respective changes for smooth development of the module.
- Open the View .ascx file and add some content to view on the page of the site and save
- Change the Debug mode from Debug to Release and Build the solution
- An Install folder will be created inside the DesktopModules folder containing two zip files.
Install and Source files will be created, from which we will need Install file.
Install the module in Evoq site
To use the custom developed module, we need to install the module in the site.
Steps for installing the module are
- Select the settings options from the personal bar and click on
- Click on Install Extension
- Upload the zip File for installing the Module which was created in step – 2. Select the Install zip file.
- Click on next and follow the steps. Accept the terms and click install. Custom module is now installed and ready to use in the site. To check whether the module has been installed or not, check the list of modules if the name of the module will appear in the list then the module has been successfully installed.
Add module in any Evoq page
To show the content of our custom module or to use the functionality of our module, we need to drag and drop that module in the specific page.
To use the module either we can create a new page for that or else we can place the module in any of the default pages of the site. If we choose to create a new page then we need to follow the below given steps.
- Click on pages
- Click on Add page. Enter the Details and save the page.
- View that page and click on the add module option of any of the content pane. You can use any of the options from the below images to add to the module.
- One popup will appear for selecting inbuilt/custom modules.
- The content of the module will be placed in the content pane which you select for adding the module.
- Publish the page if you want the content to remain as it is and if you want the changes when the page is in view mode rather than only in edit mode.
A demo of the install file is attached. If you want to install the module in your site, then download the install file and follow steps 3 and 4.