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 ExtensionsModulesModulesHow to hide other module?How to hide other module?
Previous
 
Next
New Post
4/6/2010 12:43 PM
 

 Hello,
I must have done this in the past, but cannot remember how: how to programmatically hide another module?

I have a custom module on a page, where there's also say an HTML module. Depending on my module status, I want to be able to hide the other modules (that HTML module) from code. If I were to hide my own module I'd simply call "Me.ContainerControl.Visible = False".

I can find modules in my tab, but then do not know how I should get the containercontrol of that module: can anyody help?

 

 Here's my code:

             Dim mc As New ModuleController, dc As New DesktopModuleController

                Dim moduli As Dictionary(Of Integer, ModuleInfo) = mc.GetTabModules(Me.TabId)

                For Each m As ModuleInfo In moduli.Values

                    Dim di As DesktopModuleInfo = DesktopModuleController.GetDesktopModuleByModuleName(m.ModuleName, Me.PortalId)

                    If di.ModuleName <> "MyCustomModuleName" Then

                          ' Here I want to hide m

                    End If

                Next

 

 
New Post
4/6/2010 1:08 PM
 
I think you can't do this with dnn API. But you can try use Page.Controls hierarchy for solve this task.

Team Leader
CodingStaff Development Company
Check our dnn modules and dotnetnuke skins to see where you can start.
 
New Post
4/6/2010 1:13 PM
 

As far as I know there isn't really a supported way of doing this, your route will not work, as you are working with what is defined, not what is currently on the page.

Now, if you want ALL modules to be gone, simply do a redirect to the same page and include a mid and ctl parameter for your current moduleId and the control key, this will load your specific control in isolation mode, using the admin skin, and no other modules.


-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
4/7/2010 4:39 AM
 
Mitchel Sellers wrote:

As far as I know there isn't really a supported way of doing this, your route will not work, as you are working with what is defined, not what is currently on the page.

Now, if you want ALL modules to be gone, simply do a redirect to the same page and include a mid and ctl parameter for your current moduleId and the control key, this will load your specific control in isolation mode, using the admin skin, and no other modules.

 

Thanks Mitchel: I often used the "ctl" method, but need to keep visible a couple of modules (actually two instances of two definitions of my module) this time, so that way is not good. Will try the "pagecontrols" way Tanya suggests (thank you), otherwise I can do that on the client via jQuery.

 

 
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHow to hide other module?How to hide other module?


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