Dnn module development series (3) -- add module definitions in dnn

Source: Internet
Author: User
Tags dnn dotnetnuke

Add module definition

Completed the above articlesArticleAfter the introduction, we can add the module to dnn. Although this module cannot be run now, you can add it to view its effect while developing it.

1. log in as the host (host administrator), go to "host --> module definitions", and click "Add new module definition" to add a new module definition.

2. Enter the following module information and click "Update" to save the new module.
Module name: mycompany. Article
Folder name (the folder where the module is located): Article note: this should be filled in truthfully.
Friendly name (friendly name): You can enter myarticle as needed and display the value in the list of modules that can be added.
Description: mycompany article
Version (version information): 01.00.00
Controller class (control class): This class is used to tell dnn to implement isearchable (query aggregation Interface) and iportable (import and export interface). Here we enter dotnetnuke. modules. media. mediacontroller, dotnetnuke. modules. media. We will implement these classes in the future.
Supported features (supporting attributes): After saving, dnn will automatically obtain it based on your implemented interface. Upgradeable is a new feature. I have not studied it carefully. I will talk about it later. The other two are query aggregation, which is imported and exported.
Premium: You can specify the websites on which the module is available.

3. Add module definitions. A module can contain multiple module definitions so that they can work with each other.
Definitions: an existing module definition.
New definition: Add a new module definition. Here we enter mycompany. Article

4. Add controls. Each module definition can contain multiple controls to complete operations such as list, add/edit, view, and set. Click "add control" to make the following settings:
1. Add the list display module:
Key: null. The blank control is first displayed on the page by default.
Title: Control title. Input: article
Source: The original control file. Select topmodules/article/Article. ascx.
Type: control type. It can be understood as the permission settings for accessing the control. Skin object: Skin control, anonymous: Anonymous Access, view: View permission required, EDIT: Edit permission required, admin: Host administrator permission required, host: Host management permission. Here we select view. Because you only need to view the permission for the article list.
View order: Order Number.
Icon: Control icon.
Help URL: The help address corresponding to the control.

2. Add an article to add an editing control and enter the following attributes:
Key: Edit. Key is used to identify the role of a control. InCodeYou can use the editurl method to locate the required controls. This will be detailed in the next article.
Title: Edit article
Source: shorttopmodules/article/articleedit. ascx
Type: Edit
Others are empty
3. Add the article settings control and enter the following attributes:
Key: Set. The setting control is called by default only when you click dnn settings.
Title: Setting article
Source: shorttopmodules/article/articlesettings. ascx
Type: Admin
Others are empty

After adding the article view control, we will continue to set it here. Now these operations have basically completed the definition of the entire module. However, an error occurs when adding a module. After all, we did not write a line of code. Before coding the module, we also need to first understand some namespaces, controls, and common classes related to the module. In "dnn module development series (4) -- classes related to module development", I will introduce the usage and usage of these classes and controls.
 

Series Article Navigation:
Dnn module development series (1) -- Analysis and Design
Dnn module development series (2) -- Build a module development project
Dnn module development series (3) -- add module definitions in dnn

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.