· Chris Hammond
Last Updated

DotNetNuke Daily Tip #9 7/18/06 Skin Object Using PortalModuleBase

Learn how to add a skinobject in DotNetNuke Skins that behaves like a module by inheriting from PortalModuleBase. Easily access TabId with this tip!

Learn how to add a skinobject in DotNetNuke Skins that behaves like a module by inheriting from PortalModuleBase. Easily access TabId with this tip!

After a long haitus over the past few weeks the dotnetnuke Daily Tips are back!

Sometimes you want to put a skinobject in your DotNetNuke Skins that you need to act like a module. Inheriting from PortalModuleBase instead of SkinObjectBase. SkinObjects though don't get loaded like regular modules and due to that you may run into issues where you can't easily access the TabId of the existing page. Here's how to get that information easily.

Dim objPortalModule As PortalModuleBase = DotNetNuke.UI.Containers.Container.GetPortalModuleBase(Me)
thisTabId = objPortalModule.TabId

Put the above code in your skinobject code and you will now have a PortalModuleBase object that you can use to easily access some of the basic DNN properties you're used to using from PortalModuleBase.

The above is VB code, any self respecting C# developer should be able to figure out the appropriate C# code. If not, email me and I'll bill you at my hourly rate ;)


Stay tuned for another coming tomorrow!

Back to Blog

Related Posts

View All Posts »
OpenForce07: Collection of Posts

OpenForce07: Collection of Posts

Discover the highlights from OpenForce07 in Las Vegas, featuring keynotes by industry experts and deep dives into DNN development security strategies.