
November 6, 2014 05:42 by
Ben
This is a single that threw me for a long time, nevertheless the remedy is actually quite simple. Easy sufficient that i really don't understand why there is not much more documentation on it.

Here’s the scenario: You've got a module with two, or maybe more, achievable interfaces depending on the web page the module is additional to. The view handle features a blank important area and you cannot have copy crucial fields, blank or in any other case. How can you power the non-blank module control to point out around the page with out further coding?
The answer: make use of the module definitions.
Here’s how.
A number of assumptions very first:
You’ve developed a custom made DotNetNuke module.
You have at the very least two module controls in that module.
You've got a DotNetNuke set up to check on as well as the custom module is installed.
Now stick to these actions to show multiple view controls.
- Log in as the host user, open the extensions page, and click the edit icon to edit your module

- Your module already has a default definition that typically includes a view, edit and settings control. The setup looks something like the picture below. (Note: In editing this image I accidentally shortened the source paths. The format should be DesktopModules/My Custom Module/View.ascx)

- Click the “Add Definition” link next the “Select Definition” drop down.

- On the new screen fill in the information to create the new definition and click “Create Definition”. In this case I’m calling it “Definition 2″, but you’ll want to make your definition names descriptive, or whatever meets your naming convention needs.

- Now you’ll have a fresh new module definition to fill out just like the default definition.

- You can now add new module controls to the definition. Click the “Add Module Control” link and fill out the form as a new View control by leaving the “Key” field blank. Fill in the title field, select the source and leave the Type as “View”.

- Update the definition and navigate to the web page in which you would like to incorporate the module. Incorporate the module towards the webpage. In the event you had already additional the module you’ll require to delete it and incorporate it once again or else DotNetNuke will not operate the code to add all of the see controls. Once you incorporate the module you ought to see each check out handle you produced a definition for look around the page as being a individual module occasion. In the event you do not, return and verify you accomplished the steps properly.
- At this time whatever check out controls you really don't want to look on the web page, merely delete that instance from the module.