Well I've started some research and started with some basics. DotNetNuke module controls are inherited from DotNetNuke.Entities.Modules.PortalModuleBase. They can then import various DotNetNuke interfaces for plugable features like IActionable, IModuleListener, IModuleCommunicator etc. To use a control as a webpart control, it must inherit IWebPart interface and implement it. So I just do that:
#region IWebPart Members
private string _ImageUrl;
private string _title;
private string _description;
private string _subtitle;
private string _titleIconImageUrl;
private string _titleUrl;
public string CatalogIconImageUrl
{
get
{
return _ImageUrl;
}
set
{
_ImageUrl = value;
}
}
public string Description
{
get
{
return _description;
}
set
{
_description = value;
}
}
public string Subtitle
{
get { return _subtitle; }
}
public string Title
{
get
{
return _title;
}
set
{
_title = value;
}
}
public string TitleIconImageUrl
{
get
{
return _titleIconImageUrl;
}
set
{
_titleIconImageUrl = value;
}
}
public string TitleUrl
{
get
{
return _titleUrl;
}
set
{
_titleUrl = value;
}
}
#endregion
After that, I started using it on my webpart's page. I just register that control and use it under CatalogZone control's WebPartTemplate.
My module is working well as well as my webpart control is also working cool. Anybody who want to do this can simply learn the basics for implementing webparts, and for that, just go through the walkthroughs of msdn for webparts and then try my trick.
Thanks. This was very helpful!
ReplyDeleteThanks a ton it has been a good guide, now to use dotnetnuke module control in we is without a doubt very easy utilizing your information. Thanks
ReplyDelete