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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How do I build my own module (controls/pages)How do I build my own module (controls/pages)
Previous
 
Next
New Post
9/17/2007 1:32 PM
 

How do I create other controls in my DNN module that act like the View control does? I would like to use View as my default control and then provide the capability to switch to other controls. I created a new control call it myreport. It displays the control but at same time clears out all of the other content Panes ( modules ) within the page when I redirect ( steps provided below ). 

I do see date and home at the top but the module to the left is erased? Its as if it swapped the control and the page or cleared the page when it rendered the control. I also noticed that when I login as admin and flip the module into edit mode and select the settings control, I see the same effect. ( All other content is erased while using settings too )

I followed the steps outlined in the page reference and used the following code to navigate to my new control.
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "myreport" , "mid=" + ModuleId.ToString()));
 
 
This url is generated for my module settings page while in edit mode is ( just for reference to see if it jogs your memory )

Can controls other than the view control act like view controls in that they dont clear out all other modules on redirect? I hope there is some property or redirect mechanism that allows for this behaviour.

Thanks in advance.

John

 

 
New Post
9/17/2007 5:57 PM
 

John,

I ran into this confusion earily on when developing modules for DNN.  The issue is understanding the structure of a page>module>control.  In simple terms the page is made up of several modules.  Each module has a standard display control, the view,  and typically one or more admin controls (Edit, Settings, ...). You can direct DNN to open an admin control on standalone page for some aspect of your module -- it will then not display the other modules or any aspects of the orginal page - it even uses a different skin (Admin skin).   For example, when you update the Page Settings for you module, you are taken to a page with just one control on it  that defines the processing for the page.

So for your control, if you want the standard view to have several different "looks" then you must control this by displaying different sections (I use panels)  of you view control.  The Survey module does something similar -- either asks a question or shows the results, but it the same view control that does both depending on whether the user has answered the question.  The Add question control is an administration control that will open on a admin page with no other moduels on the page..

If you want to display "My Report" on a page by itself, then you can create a "myreport" admin control - similar to the Edit control -- that will open by itself - no other controls on the page. Again take a look a the survey module to see how control is passed.

What if you want to navigate to a different page where there is a module  that you want ... This is a bit tricky.  What if the control is on several pages, which page do you jump to ???   If  you "know" the module will only be one page then you can look it up using the friendlyname and determine the page (tabid) that you want to open.   This not  recommended but in certain instances it does work, but I would recommend reconsidering the overal module design before resorting to this....

Hope this helps.
Paul.

 

 
New Post
9/17/2007 6:49 PM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
9/18/2007 7:35 PM
 

Thanks Paul, IIt helps to know I am not the only one who is looking for this bit of functionality and I havent missed something obvious. I am currently using a Multiview and switching activeviews and that works well, but once you get a few "Pages/Views" worth of functionality the callback logic gets a bit overwhelming so I am looking for ways to split that up. It looks like from what you are telling me that this is a common situation. Ill keep digging.

 

Thanks so much for taking the time to write, its good to know Im not alone in the trenches.

 

Appreciate it!

John

 
New Post
9/18/2007 7:43 PM
 

Wow,

Excellent write up, concise and covers the bases. I wondered what the "multiple definitions" was all about. This information plus a prior post wraps this up for me. I dont think I would have found this info in a month of searching. THANKS!

John

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How do I build my own module (controls/pages)How do I build my own module (controls/pages)


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