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.0Turning off Display Container programmaticallyTurning off Display Container programmatically
Previous
 
Next
New Post
11/20/2006 6:04 PM
 

Has anyone tried to turn off a module's 'Display Container' programmatically?

I've been able to turn off 'Allow Print' and 'Allow Syndicate', and set 'Visibility' to None using 

ModuleConfiguration.DisplayPrint = False
ModuleConfiguration.DisplaySyndicate =
False
ModuleConfiguration.Visibility = VisibilityState.None

I've tried setting 'ModuleConfiguration.DisplayTitle = False', if I'm reading the book correctly, that is what is indicated.  Is it a timing problem or is this not implemented?


Bruce Casson, WDK Solutions
 
New Post
2/12/2007 11:34 AM
 
Did you ever figure out how to turn off the container programmatically?
 
New Post
2/12/2007 4:09 PM
 

Okay, I figured this out.  Simply setting Me.ModuleConfiguration.DisplayTitle = False does NOT work.  Not sure why, but if this is true you can simply update the module settings and reload the page like so:

In the Page_Init or Page_Load section of your module's code behind, do this

Try

 

If Me.ModuleConfiguration.DisplayTitle Then

 

 

Dim objModules As New Entities.Modules.ModuleController' update module

 

objModule.DisplayTitle =

Dim objModule As Entities.Modules.ModuleInfo = objModules.GetModule(ModuleId, TabId, False)False

objModules.UpdateModule(objModule)

'Redirect back to the page so the new setting takes effect.

Response.Redirect(NavigateURL(),

 

True)End If

 

 

Catch ex As ExceptionEnd Try

 
New Post
2/17/2007 8:09 AM
 
Thanks, I'll give this a try.  I had just suggested to the client that they should turn it off manually.

Bruce Casson, WDK Solutions
 
New Post
2/17/2007 12:05 PM
 

The code above got rearranged somehow. 

Try 

' If the setting is True, Then change it to false by getting a module controller object

If Me.ModuleConfiguration.DisplayTitle Then  

Dim objModules As New Entities.Modules.ModuleController

' Since this is inside a module you can easily grab the ModleID and TabId

 Dim objModule As Entities.Modules.ModuleInfo = objModules.GetModule(ModuleId, TabId, False)

' This is where you set the DisplayTitle to False

objModule.DisplayTitle = False

' Finally you have to submit that module update

objModules.UpdateModule(objModule)

'Redirect back to the page so the new setting takes effect.Response.Redirect(NavigateURL(), True)

 

End If

Catch ex As Exception

End Try

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Turning off Display Container programmaticallyTurning off Display Container programmatically


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