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.0Getting Module InformationGetting Module Information
Previous
 
Next
New Post
11/14/2006 4:33 PM
 
I am working on my first module (actually I am creating a provider), so this question will probably be an "elementary" one.  In the provider I am creating, I have a need to get the title of a single module instance using it's ModuleId.  How would I go about doing that?

If this is already asked and answered somewhere, I apologize.  I was not able to find it.  :(

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
11/14/2006 5:55 PM
 

If you need the Module Title from within a module control (which will inherit from PortalModuleBase) you can simply use:

Dim Title As String = Me.ModuleConfiguration.ModuleTitle

If you need the Module Title of a different module (or need to obtain the Module Title from a provider, etc.) you can use the following:

Dim mc As New DotNetNuke.Entities.Modules.ModuleController
Dim mi As DotNetNuke.Entities.Modules.ModuleInfo = mc.GetModule(ModuleId, TabId)
Dim Title As String = mi.ModuleTitle

As a module having the same ModuleId can appear on more than one page (Tab), if it has been created by adding a copy of an existing module to a page or the module's AllTabs property has been set true, the GetModule method takes a TabId as well as a ModuleId for its parameters.  I haven't looked at the Modules and TabModules tables for a while or at the 'GetModule' stored proceedure, but seem to remember that it can be called with TabId = -1. In the case of the ModuleTitle, it should be the same across all pages anyway.


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
11/15/2006 3:38 PM
 
Excellent!  The second example is exactly what I needed.  Thanks a lot!

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Getting Module InformationGetting Module Information


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