Wednesday, February 27, 2013

DNN Manage Button Hidden Behind Another Module

There is one issue I've run into several times with DNN and that is an HTML module covering up another module.  I had this issue with the Dark Knight skin.  An HTML module I had on the ContentPane was covering up the dropdown menu, so I had to make some CSS adjustments to the z-index property.

The issue I have now is slightly different.  I've written several modules that either:
  1. Do not display anything in the View (they work in the background), but you still need to access the Settings to make changes
  2. Do not display anything in the View if there is no data
The problem is if you are in Edit mode and nothing is being displayed, you cannot get to the Manage button because it is 'behind' the Manage button of the module below it.


I've come up with a simple fix for this that I include in my View.ascx file:


<% if(DotNetNuke.Common.Globals.IsEditMode()) { %> 
 
<div runat="server" id="showIfEditMode" >
   <br />
   <br />
   <br />
</div>
 
<% } %> 
 
 


This adds some padding below the module when you are in Edit mode. That way, your Manage button will be visible even when there is nothing to display.