DotNetNuke Modules – PortalModuleBase

F03I0037 We’ve been through most of the basics now with respect to creating the View module of the DotNetNuke module set.  We will be moving on to the Settings module next.  But before we do, we need to review a few important properties and methods of the PortalModuleBase class that the view module inherits from.

This list will not be a complete list, but it will cover the most important APIs for this class.

API Description
LocalResourceFile This property returns the location of the resource file associated with this control.  Used in conjunction with internationalization.  We’ve already used this property in our previous example showing how to add actions.
ModuleId Each instance of the module gets a unique ID.  This property is that ID.  You should use this to access data that is instance specific.
ModulePath The root relative path to the location of the module.  This does not include the file name.  If you want the location of the file on the hard drive, you’ll need to use Server.MapPath() to convert it.
PortalAlias Holds the alias string used to access the site, the PortalId, and the alias ID.
PortalID Each portal gets its own ID.  In one application I wrote, I wanted every instance of the module to grab data from the same pool of data so I needed to use the PortalID as the unique identifier rather than the moduleID as is the recommended way.  You may have your own uses for this information.
PortalSettings Holds lots of information about the portal, most of which is set in site settings using the administrator account.
TabID Tells you what page the module is located on.
UserID Uniquely identifies the logged-in user.  If the value is -1, the user is not logged in.
UserInfo Gives you more specific information about the user, including:
- UserName
- FirstName
- LastName
- Roles

 


Other post in DotNetNuke - Module Development

Other Related Items:

Petsafe RFA-188 3-Volt Lithium Battery ModulePetsafe RFA-188 3-Volt Lithium Battery ModuleReplacement battery for Little Dog No Bark Collar model No. PBC00 10782. Easy to use coin slot for battery installation. Waterproof seal. On Off function built into the battery module by turning to appropriate settings.
Linux Pocket GuideLinux Pocket GuideLinux Pocket Guide gets you up to speed quickly on day-to-day Linux use. It's organized the way you use Linux: by function, not just alphabetically. ... Read More >

Related Post

Comments are closed.

DotNetNuke Sponsor

 

Most Valuable Blogger
Sponsor