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.
- Open YOURDNN/Admin/ControlPanel/iconbar.ascx with a text editor or Visual Studio.
- 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';
}
}
< font>script>
<style>
.floatPanelTop{background-color:#333333;color: #ffffff;padding-top:2px;padding-bottom:2px;cursor: hand;}
< font>style>
<div class="floatPanelTop" onclick="toggleToolbar();">Control Panel< font>div>
<div id="toolbar" style="display:none;">
<table class="ControlPanel" cellspacing="0" cellpadding="0" border="0">
-
Save your file
-
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.