<script language="C#" runat="server">
protected override void OnInit(EventArgs e)
{
switch (CSContext.Current.SiteThemeData.GetIntValue("columns", 2))
{
case -1:
// one column, left (right content is rendered below left content)
lc.Controls.AddAt(0, new LiteralControl("<div id=\"CommonSidebarLeft\">"));
lc.Controls.Add(rc);
lc.Controls.Add(new LiteralControl("</div>"));
break;
case 1:
// one column, right (left content is rendered above right content)
rc.Controls.AddAt(0, lc);
rc.Controls.AddAt(0, new LiteralControl("<div id=\"CommonSidebarRight\">"));
rc.Controls.Add(new LiteralControl("</div>"));
break;
default:
// two columns
lc.Controls.AddAt(0, new LiteralControl("<div id=\"CommonSidebarLeft\">"));
lc.Controls.Add(new LiteralControl("</div>"));
rc.Controls.AddAt(0, new LiteralControl("<div id=\"CommonSidebarRight\">"));
rc.Controls.Add(new LiteralControl("</div>"));
break;
}
Telligent.Glow.PopupMenu communityMenu = CSControlUtility.Instance().FindControl(this, "CommunityPopup") as Telligent.Glow.PopupMenu;
if (communityMenu != null)
{
communityMenu.MenuItems.Add(new Telligent.Glow.PopupMenuItem(" Introduction", SiteUrls.Instance().Home, null, null));
communityMenu.MenuItems.Add(new Telligent.Glow.PopupMenuItem(" Help Center", SiteUrls.Instance().ForumsHome, null, null));
communityMenu.MenuItems.Add(new Telligent.Glow.PopupMenuItem(" Downloads Area", CommunityServer.Files.Components.FileGalleryUrls.Instance().Home, null, null));
communityMenu.MenuItems.Add(new Telligent.Glow.PopupMenuItem(" The Gallery", SiteUrls.Instance().GalleriesHome, null, null));
communityMenu.MenuItems.Add(new Telligent.Glow.PopupMenuItem(" News Articles", SiteUrls.Instance().WeblogsHome, null, null));
//communityMenu.MenuItems.Add(new Telligent.Glow.PopupMenuItem("Events", CommunityServer.Files.Components.FileGalleryUrls.Instance().Home, null, null));
//communityMenu.MenuItems.Add(new Telligent.Glow.PopupMenuItem("Fighters", CommunityServer.Files.Components.FileGalleryUrls.Instance().Home, null, null));
Page.ClientScript.RegisterStartupScript(this.GetType(), "menus", @"
<script type=""text/javascript"">
// <![CDATA[
var menu = document.getElementById('communityMenu');
if (menu)
menu.onmouseover= new Function('navigation_showPopup(" + communityMenu.ClientID + @", this);');
// ]]>
</" + "script>", false);
}
base.OnInit(e);
}
</script>