Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesMultiple User control in one module zip file using christo c templateMultiple User control in one module zip file using christo c template
Previous
 
Next
New Post
2/15/2012 7:43 AM
 

Hello All,

I am little new to module development; I am using christoctemplate.codeplex.com as module development template and want to use the same to produce 6 user controls.

Basically I want to develop wizard type pages and the logic is pertain to 6 different user controls, for that I have decided to use christoctemplate; I have develop basic module using the same that contains three user controls (1 for View; 2 for setting; 3 for edit) and I am able to install it success fully.

Now I want to add more user controls in this module (one for each steps); I am able to add them in project and build but when I install the package the module don't show option to chose which user control to display when adding to page.

I know that I need to add them in Modules.DNN (DNN Manifest file) but I don't know how? At present the file looks like following.

Any help would be most appreciated.

Best Regards, Jigar

<component type="Module">
          <desktopModule>
            <moduleName>SilverCoderModules</moduleName>
            <foldername>SilverCoderModules</foldername>
            <businessControllerClass>DotNetNuke.Modules.SilverCoderModules.Components.FeatureController</businessControllerClass>
            <supportedFeatures />
            <moduleDefinitions>
              <moduleDefinition>
                <friendlyName>SilverCoderModules</friendlyName>
                <defaultCacheTime>0</defaultCacheTime>
                <moduleControls>
                  <moduleControl>
                    <controlKey />
                    <controlSrc>DesktopModules/SilverCoderModules/View.ascx</controlSrc>
                    <supportsPartialRendering>False</supportsPartialRendering>
                    <controlTitle />
                    <controlType>View</controlType>
                    <iconFile />
                    <helpUrl />
                    <viewOrder>0</viewOrder>
                  </moduleControl>
                  <moduleControl>
                    <controlKey>Edit</controlKey>
                    <controlSrc>DesktopModules/SilverCoderModules/Edit.ascx</controlSrc>
                    <supportsPartialRendering>False</supportsPartialRendering>
                    <controlTitle>Edit Content</controlTitle>
                    <controlType>Edit</controlType>
                    <iconFile />
                    <helpUrl />
                    <viewOrder>0</viewOrder>
                    <supportsPopUps>True</supportsPopUps>
                  </moduleControl>
                  <moduleControl>
                    <controlKey>Settings</controlKey>
                    <controlSrc>DesktopModules/SilverCoderModules/Settings.ascx</controlSrc>
                    <supportsPartialRendering>False</supportsPartialRendering>
                    <controlTitle>SilverCoderModules Settings</controlTitle>
                    <controlType>Edit</controlType>
                    <iconFile />
                    <helpUrl />
                    <viewOrder>0</viewOrder>
                  </moduleControl>
              
                </moduleControls>
              </moduleDefinition>
            </moduleDefinitions>
          </desktopModule>
        </component>


 

 

 
New Post
2/15/2012 11:04 AM
 
When you add a module to a page the view defined in the manifest that does not have a control key is the one that will be displayed to the user.

From there you can either redirect them to another control, or manage the internal loading of controls yourself within the main view control.

-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
2/16/2012 6:04 AM
 

Hello Mitchel Sellers,

Thanks for your reply. Can you please update above DNN file to add more than one user control. e.g in DNN 3.0 manifest you can do this using following. (I Found it in blog module)

My requirement is one module contains multiple user controls. Please provide help on that.

Thanks,

Jigar

 

 

<module>
     <friendlyname>Blog_List</friendlyname>
     <cachetime>-1</cachetime>
     <controls>
      <control>
       <title>Blog List</title>
       <src>DesktopModules/Blog/BlogList.ascx</src>
       <type>View</type>
      </control>
      <control>
       <key>Edit_Entry</key>
       <title>Edit Entry</title>
       <src>DesktopModules/Blog/EditEntry.ascx</src>
       <type>Edit</type>
      </control>

 
New Post
10/1/2012 5:09 AM
 
Solution:
Step:-1   Add your Control in Manifest file(.dnn)
Step:-2  Modify Code in Code-behind of user control(.ascx.cs)

Explained:
Let I have added a module named as MyModule1, and inside MyModule1 i have added a WebUserControl named Demo
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Step:-1   Adding your Control in Manifest file (.dnn)

go to DesktopModules &gt;&gt; MyModule1 &gt;&gt;
Open manifest file (MyModule1.dnn)
Under <modules> tag add your new module tag and leave other module as it is

<modules>
   <module>
    ......
    .......
   </module>

<!--Adding MyControl- Demo Starts Here-->
<module>
<friendlyname>Demo</friendlyname>
<cachetime>0</cachetime>
<controls>
<control>
<src>DesktopModules/MyModule1/Demo.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
</controls>
</module>
<!--Adding MyControl- Demo EndsHere-->
<modules>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Step:-2  Modifying Code in Code-behind of user control(.ascx.cs)

If u are using Your own  Controls (.ascx) other than the default (view, edit &amp; settings .ascx), then you need to modify some code in your Web User Control.
go to DesktopModules &gt;&gt; MyModule1
open the code behind file i.e. Demo.ascx.cs and replace the Inherited class named "System.Web.UI.UserControl" with "DotNetNuke.Entities.Modules.PortalModuleBase"

Before replacing it will look like as:-

public partial class DesktopModules_MyModule1_Demo : System.Web.UI.UserControl
{
     protected void Page_Load(object sender, EventArgs e)
      {
      }
}

After replacing it will look like as:-

public partial class DesktopModules_MyModule1_Demo : DotNetNuke.Entities.Modules.PortalModuleBase
{
    protected void Page_Load(object sender, EventArgs e)
      {
      }
}
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesMultiple User control in one module zip file using christo c templateMultiple User control in one module zip file using christo c template


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out