Community   »   Forums
RSS Feed Available AddThis - Bookmarking and Sharing Button Printer Friendly

PrevPrev NextNext

Expand/Collapse the DotNetNuke Control Panel bar

by Will M on 09 Oct 2006 01:04 AM

Even with widescreen displays I really hate having "extra stuff" on the screen.  I really like the top Icon Control Panel Bar that appears on the page when you are logged in to DotNetNuke.  However, I don't like how much space it takes up.  I typically view the site while preview is checked.  This helps getting rid of most extra items.  As I was building the new ActiveModules.com, I wanted to do something to make that Control Panel bar go away.  I first tried making stay at the bottom of the screen, but that became pretty annoying.  In about 10 minutes I put together a very simple solution that will hide and open the control panel.  I will warn you, this does require making a change to one of the core files.  I believe there is a way to register an additional toolbar file, but this was pretty easy.

  1. Open YOURDNN/Admin/ControlPanel/iconbar.ascx with a text editor or Visual Studio.
  2. Add the following code to the iconbar.ascx file:

    <%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.ControlPanels.IconBar" CodeFile="IconBar.ascx.vb" %>

    <script language="javascript" type='text/javascript'>
    function
    toggleToolbar() {
    var oGroup = eval(document.getElementById("toolbar"));
    if (oGroup.style.display == 'block') {
    oGroup.style.display =
    'none';
    }
    else{
    oGroup.style.display =
    'block';
    }
    }
    script>
    <
    style>
    .floatPanelTop{background-color:#333333;color: #ffffff;padding-top:2px;padding-bottom:2px;cursor: hand;}
    style>
    <
    div class="floatPanelTop" onclick="toggleToolbar();">Control Paneldiv>
    <
    div id="toolbar" style="display:none;">

    <
    table class="ControlPanel" cellspacing="0" cellpadding="0" border="0">

  3. Save your file

  4. Login as administrator or host and test it out. Simply click on Control Panel to hide and open the Icon Bar.

Before:


After - Hidden:


After - Open:




I have also attached the updated file below. 

Will Morgenweck
Active Modules

0 Comments for Expand/Collapse the DotNetNuke Control Panel bar

Quick Reply
toggle
  Username:
Subject:
Body:
Security Code:
Enter the code shown above in the box below

Submit
Active Forums 4.1
Copyright 2008 by Active Modules, Inc.
Social Networking |  Home |  Products |  Services |  Community |  Company |  Buy Now