Using the Module Creator

Overview

The DNN Module Creator enables developers to quickly build modules without a full-blown IDE, like Visual Studio. It automates many of the initial module creation tasks so that module developers can focus on writing code. In addition, the Module Creator can be extended with custom templates to further streamline development.

The DNN Module Creator is generally recommended only for simple modules. For more complex modules, you can create a Web Forms module using templates.

This article provides instructions on how to use the Module Creator.


  

Environment

  • DNN Platform
  • Evoq Content
  • Evoq Engage

 


 

Prerequisites

You need a local DNN installation with host permissions to perform the steps outlined in this article.

 


  

Process

  1. Create, copy, or edit a page.

  2. Within a pane, click on the Module (box) icon.

    Pane with content icons

  3. Search for the Module Creator among the installed modules.

    Search for Module Creator.

  4. Drag the Module Creator module to any pane on the webpage.

    Drag to a pane.

  5. Fill in the Module Creation form.

    Module Creation form

    Field Description
    Owner Name
    • Name of your organization
    • Must contain only alphanumeric characters
    • Used to create a folder to distinguish your modules from those created by other module creators                 
    • Also used as the namespace for your code
    Module Name     
    • Must contain only alphanumeric characters
    • Used to create the module's friendly name and full name
    • The full name is [OwnerName].[ModuleName] with space characters removed.
    Language   The selected language (C#, VB, or Web) determines which templates become available.
    Template
    For C# and VB, choose among:
    • Inline Script: The code is embedded. It also uses user controls.
    • Razor: Uses Razor scripts to render views.
    • User Control: The code is stored in separate files. Most commonly used.

    For Web, the HTML template allows you to use HTML, CSS, and JavaScript.

    Control Name Name of the primary module control that is registered with DNN

    The new module replaces the Module Creator form in the pane.


    Screen_Shot_2019-10-16_at_1.50.24_PM.png
  6. Customize the module.

    1. Click the gear icon and choose Develop.

      Settings (gear icon) > Develop

    2. In the View.ascx file, delete all the lines of code, except the first one.

      In View.ascx, delete all except first line.

    3. Add markup to customize the module, then click Update to save your changes.

      Customize the module.
      Example:

      <h1>Hello, <%: UserInfo.DisplayName %></h1>

    4. From the Select File dropdown, choose the View.ascx.cs file.

      Select View.ascx.cs.

    5. Remove all the code in the Event Handlers region and click Update to save your changes.

      Remove Event Handlers.

 


Parent Topic

Related References

Related Information

 

Back to top

Comments

0 comments

Please sign in to leave a comment.