Hi!
I have to do a small change in the InjectModule method in the class DotNetNuke.UI.Skins.Skin. I have written a new class that inheritate the skin class. This is where I want to override the injectmodule.
ex:
public override void InjectModule(Control objPane, ModuleInfo objModule, DotNetNuke.Entities.Portals.PortalSettings PortalSettings) {
base.InjectModule(objPane, checkNumberOfModulesInPane(objModule), PortalSettings);
}
I have to make a small change in the DotNetNuke framework to make InjectModule overridable, and I do not want to make changes there because of upgrades.
What I try to do in checkNumberOfModulesInPane is if I have two modules in a Pane force it to use some other containerSrc than if there is only one module in a Pane.
ex:
public ModuleInfo checkNumberOfModulesInPane(DotNetNuke.Entities.Modules.ModuleInfo module)
{
if (module.PaneModuleCount > 1)
{
if (module.PaneModuleIndex == 0)
{
module.ContainerSrc = "Advis_B_Left.ascx";
}
else
{
module.ContainerSrc = "Advis_B_Right.ascx";
}
}
else
{
module.ContainerSrc = "Advis_A.ascx";
}
return module;
}
Finally my question. Is it possible to do this without making the InjectModule overridable?