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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Placing modules into another module.Placing modules into another module.
Previous
 
Next
New Post
9/12/2008 1:43 AM
 

Hello

How can i place exisiting modules into another module or a newly created module.

I have a CSS tabs module comprises multi-tabs.I want to place other modules into it.

How can i achieve this.

Is that via inheriting PortalModulebase and passing the ids of the modules are render so.

Where i need to modify and write the code to achive this.

I looked at modules like CSS Tabs and Aggregator which are good.But i think it requires too much modification.

Thx

 

 
New Post
9/12/2008 11:25 AM
 

If you want to integrate multiple modules into the same display, I would highly recommend just using one of the available third party mdoules.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
9/13/2008 5:17 AM
 

Thanks Mitchel

I know that its not easy to build such a functionality and even i build it , is prone to errors.

Let me tell you my perspective.Its not only about deploying in the site however its also important.But i am interested in knowing the inner working of the framework.

Please tell me which module i go with??I am planning to include urlmaster.

I tried with YUI tabview for the past one week however no result.I achieve it in a different manner by making use of containers.But that is much time consuimg..

  ctrl = "DesktopModules/HTML/HtmlModule.ascx"

            Dim objPMB As PortalModuleBase = DirectCast(Me.LoadControl("~/" + ctrl), PortalModuleBase)
            objPMB.ModuleConfiguration = Me.ModuleConfiguration

            objPMB.ID = System.IO.Path.GetFileNameWithoutExtension(ctrl)

            ph.Controls.Add(objPMB)

 

Thx

Eldho

 
New Post
9/13/2008 10:42 AM
 

Eldho,

Have you reviewed Module Wrapper from ZLDNN or Live Content from Mandeep?


pmgerholdt
 
New Post
9/13/2008 3:54 PM
 

You can use znn module for this as third party.

If you want to make something yourself. Use this code. It is more or less a copy of the vb framework of dnn, but then in c#. due to versioning I did not  remove the commented lines.
Make sure you use: slaveModule.EndDate = DateTime.MaxValue; //work around. It has taken us quite a few days to find out that this was actually turning our module invisible :-(

ENJOY!

J.

 /// <summary>
/// Init (load/create and add) dynamic controls.
/// </summary>
protected virtual void InitDynamicControls()
{
Skin skin = Skin.GetParentSkin(this);
ModuleController moduleController = new ModuleController();
ModuleInfo objModule = null;
if(BasicStoreInfo.StorePortalRegionInfo.DisclaimerModuleId.HasValue)
objModule = moduleController.GetModule(BasicStoreInfo.StorePortalRegionInfo.DisclaimerModuleId.Value, BasicStoreInfo.StorePortalRegionInfo.DisclaimerTabId, false);

if (objModule != null)
{
ModuleInfo slaveModule = objModule.Clone();
if (slaveModule != null) //BAPY-3095
{
if (slaveModule.InheritViewPermissions)
slaveModule.AuthorizedViewRoles = PortalSettings.ActiveTab.AuthorizedRoles;

slaveModule.Header = "";
slaveModule.Footer = "";
slaveModule.StartDate = DateTime.MinValue;
slaveModule.EndDate = DateTime.MaxValue; //work around.
slaveModule.PaneName = DotNetNuke.Common.Globals.glbDefaultPane;
slaveModule.Visibility = VisibilityState.None;
slaveModule.Color = "";
//If Request.QueryString("dnnprintmode") <> "true" Then
// slaveModule.Alignment = "center"
//End If
slaveModule.Border = "";
slaveModule.DefaultCacheTime = -1;
slaveModule.DisplayTitle = false;
slaveModule.DisplayPrint = false;
slaveModule.DisplaySyndicate = false;
//FROM DNN 4.5.5 source.
// If Not objModule Is Nothing Then
// 'Clone the Master Module as we do not want to modify the cached module
// slaveModule = objModule.Clone()
// If slaveModule.InheritViewPermissions Then
// slaveModule.AuthorizedViewRoles = PortalSettings.ActiveTab.AuthorizedRoles
// End If
//End If

//For SKIN-4252
//Commented out by Beasyer on 2008-03-18
//objModule.EndDate = DateTime.Now.AddDays(1); jo: 20080320 --> set to avoid that if <> host or <> admin
//a red box is shown that only visible to admin--> but probably site effect!
//slaveModule.Visibility = VisibilityState.None;
//slaveModule.DisplayTitle = false;
//slaveModule.DisplaySyndicate = false;
slaveModule.ContainerSrc = SkinController.formatSkinSrc("[G]" + SkinInfo.RootContainer + "/_default/No Container.ascx", PortalSettings);

//if ((slaveModule.StartDate >= DateTime.Now || slaveModule.EndDate <= DateTime.Now) ||
// (slaveModule.AuthorizedViewRoles.ToLower = ";" & PortalSettings.AdministratorRoleName.ToLower & ";"))
//{
// //WILL SHOW MESSAGE!
// Console.WriteLine("show message");
//}

if (PortalSecurity.HasNecessaryPermission(slaveModule.ControlType, PortalSettings, slaveModule))
{
//try to inject the module into the skin
try
{
Control myControl = new Control();
skin.InjectModule(myControl, slaveModule, PortalSettings);

//StringWriter strWrt = new System.IO.StringWriter();
//myControl.RenderControl(new HtmlTextWriter(strWrt));
//DotNetNuke.UI.Utilities.DataCache.SetCache(cacheString, strWrt.ToString(), DateTime.Now.AddHours(Convert.ToInt32(_settings.CategoryMenu.CacheTime)));

//TextBox txtBox = new TextBox();
//txtBox.TextMode = TextBoxMode.MultiLine;
//txtBox.ReadOnly = true;
//txtBox.Enablev13wstat3 = false;
//txtBox.Text = strWrt.ToString();

//plhDlvryCd.Controls.Add(txtBox);
plhDlvryCd.Controls.Add(myControl);
}
catch (Exception e1)
{
Exceptions.ProcessModuleLoadException(ContainingDNNModule2.Parent, e1);
}
}
}
}
}

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Placing modules into another module.Placing modules into another module.


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