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...Getting StartedGetting Startedload filemanager from my module at runtimeload filemanager from my module at runtime
Previous
 
Next
New Post
1/28/2012 8:39 AM
 
hello, im learning to develop custom modules, and i would like to know how (if possible) to load dnnfilemanager module from my own custom module and (if possible) to config it in order to set ther root folder based on user account.

 
New Post
1/28/2012 11:27 AM
 
I've not tested this, but you can probably do a loadcontrol for the DesktopModules\Admin\FileManager\filemanager.ascx user control and set the root folder via the RootFolderPath public property

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/28/2012 1:59 PM
 
hello, i managed to load the module this is the code that i found by googling.

string sControl = "~/DesktopModules/Admin/FileManager/filemanager.ascx";

PortalModuleBase objPortalModuleBase = (PortalModuleBase)this.LoadControl(sControl);
objPortalModuleBase.ModuleConfiguration = this.ModuleConfiguration;

objPortalModuleBase.ID = System.IO.Path.GetFileNameWithoutExtension(sControl);
phContenido.Controls.Add(objPortalModuleBase);

but how can i access the public property RootFolderPath

how can i instantiate something like DotNetNuke.Modules.Admin.FileManager
how can i to cast it.

im using the Christoc's template. is there some way to put a break point in filemanager.ascx.cs?




 
New Post
1/28/2012 9:27 PM
 

Rather than casting the loaded control to PortalModuleBase, you should be able to cast it to:

DotNetNuke.Modules.Admin.FileManager.FileManager

which will allow you to access the public RootFolderPath property. Note, however, that this property does not have a "setter" so is effectively read-only.

In order to set a break point within the FileManager user control you would need to be developing your module either within a DNN source installation (compiled in Debug configuration in VS prior to configuration and with debug="true" mode set in the site's <ompilation> element in web.config) or with your separate module project referencing the DotNetNuke.dll compiled in debug configuration and including a source installation in your module project's solution. Set a break point in your own code at the point where you do the LoadControl. You should then be able to step into the FileManager's OnInit or OnLoad method and be able to set additional break points within in the FileManager code.

I find that it is helpful when working closely with the DNN API's and especially when trying something like this that is a bit on "the edge" of good practices, you must at least have a source installation of DNN available to "study" as to what is expected for method parameter values, etc.

 


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/29/2012 8:14 AM
 
hello, my problem is that i have no access to the .admin part

vs 2010 underline it in red, and says something like 
"the type or namespace 'Admin' does not exist in the namespace 'DotNetnuke.Modules' (are you missing an assembly reference?) "
so i cant neither instantiate neither cast it.the same occurs trying to using. from DotNetNuke.modules i have only 
.console 
.Dashboard
.htmleditorprovider
.navigationprovider
.nutrimet (my custom module)
.searchinput


have i something misconfigured?


at the end i try to learn how (if possible ) to reuse dnn modules (thinking this is a good way) 
but from your words " trying something like this that is a bit on "the edge" of good practices" 
i understand that perhaps it´s not so good. so is there a better way to do it?

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting Startedload filemanager from my module at runtimeload filemanager from my module at runtime


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