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.0Update Module Header via Code or SQLUpdate Module Header via Code or SQL
Previous
 
Next
New Post
9/7/2007 10:29 PM
 
Just curious if anyone has ever attempted to update a module's header (for example with javascript) from within the module itself with code or SQL?

I'm thinking that with tokenReplace you might be able to pull this off or with a Stored Proc, but I was I was hoping that perhaps there was a means of doing this with ModuleSettings within code.

Appreciate any guidance.

-eric
 
New Post
9/8/2007 6:30 AM
 

What exactly are you trying to do?

Change the value of the text in a module's headed.

You can do that in te page_init event of any module:

Me.ModuleConfiguration.ModuleTitle = "Some Title"

Westa

 
New Post
9/8/2007 7:03 AM
 

Thanks for the reply Westa. Yes that is exactly what I'd like to do except instead of the Title, I want to update Settings | Advanced Settings | Header which maps to the Header field in the Modules table.

I've got the DNN 3.0 Wrox book and I don't see any mention of how to access that setting via code as you indicate above. Looking at the ModulesSettings.ascx.vb code behind and it appears that it should just be Header.

' get module
Dim objModules As New ModuleController
Dim objModule As ModuleInfo = objModules.GetModule(ModuleId, TabId, False)
If Not objModule Is Nothing Then

....mo re code....

txtHeader.Text = objModule.Header
txtFooter.Text = objModule.Footer


I'll keep digging.

 
New Post
9/8/2007 7:54 AM
 

 

All the properties of the current module are exposed in:

me.ModuleConfiguration

And at a guess - provided that you make your changes in a modules PAGE_INIT event - given that most code does any property handling in PAGE_LOAD or PRERENDER - the effects should render into the final HTML.

Though having said that - your milage may vary.

So test and test and test.

Westa


 
New Post
9/8/2007 7:58 PM
 

PAGE_INIT and PAGE_LOAD both seem to work just fine. 

I will have to look into tokenReplace options though, because otherwise the Header would always be hardcoded to whatever I'm writing there.  Any experience with that by chance?

BTW  - Thanks for the nudge in the right direction.  :)

-e

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Update Module Header via Code or SQLUpdate Module Header via Code or SQL


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