To paraphrase what Joe Audette said, wrapping modules inside of custom modules to acheive a special layout will be hit and miss. Some modules (like the Feed Manager and HTML Module) will work fine, whereas others (like the Calendar and Contact Form) will not. My blog post needs to be updated as it demonstrates how to use the Contact Form inside of UI widgets, but that really doesn't work. The end result of following my blog post is that the Contact form can not be submitted because each form wants to be filled out for the Submit function to work. I corrected this by using the ASP.NET tab control instead of the UI widgets.
At any rate, to acheive what you want to do:
- Create a new file named WhatEverYouWant.ascx.
- Add the following to the file:
<%@ Control Language="C#" ClassName="MultiModuleInTabsModule.ascx" Inherits="mojoPortal.Web.SiteModuleControl" %>
<%@ register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="portal" %>
<%@ Import Namespace="mojoPortal.Business" %>
<%@ Import Namespace="mojoPortal.Business.WebHelpers" %>
<%@ Import Namespace="mojoPortal.Web.Framework" %>
<%@ Import Namespace="mojoPortal.Web.Controls" %>
<%@ Import Namespace="mojoPortal.Web.Editor" %>
<%@ Import Namespace="mojoPortal.Net" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
}
</script>
<div id="eventticker">
<div class="floatpanel">
<div class="floatpanel section" style="width: 47%;">
<portal:ModuleWrapper ID="ModuleWrapper1" runat="server" ConfigureModuleID="100" />
</div>
<div class="floatpanel section" style="width: 47%">
<portal:ModuleWrapper ID="ModuleWrapper2" runat="server" ConfigureModuleID="102" />
</div>
</div>
</div>
3. Change the ConfigureModuleID's to match the modules you want to wrap.
4. Upload the file to your site in the /Modules directory.
5. Create a new Feature using the "Administration > Advanced Tools > Feature Installation" tool.
I will post here when I have updated my blog.
Hope this helps,
Joe