We have a dotnetnuke website that has a couple different skins that are used throughout the site. On each of these skins we have the same exact code for the header and footer. So when a change needs to be made to either the header or footer, we need to go into each skin and make the changes.
To clean up our skins and make future modifications easier, we have now created a control called "header.ascx" and placed the header html in that control.
01.
<%@ Register TagPrefix="dnn" TagName="RADMENU" Src="~/Admin/Skins/DNNRadMenu/DNNRadMenu.ascx" %>
02.
03.
<
div
id
=
"header"
>
04.
<
div
id
=
"logo"
>
05.
<
a
id
=
"A1"
href
=
"~/Default.aspx"
runat
=
"server"
><
img
id
=
"Img1"
src
=
"~/Portals/_default/Skins/Website/images/logo.png"
runat
=
"server"
/></
a
>
06.
</
div
>
07.
<
div
id
=
"nav"
>
08.
<
dnn:RADMENU
ID
=
"RADMENU1" runat="server" />
20.
</
div
>
21.
</
div
>
Then in our main skin file "home.ascx" we utilize the control like this:
1.
<%@ control language="vb" autoeventwireup="false" explicit="True" inherits="DotNetNuke.UI.Skins.Skin" %>
2.
<%@ register tagprefix="include" tagname="Header" src="~/Portals/_default/Skins/Website/includes/header.ascx" %>
3.
4.
<
div
id
=
"container"
>
5.
<
include:Header
runat
=
"server"
/>
6.
<
div
id
=
"ContentPane"
runat
=
"server"
></
div
>
7.
</
div
>
This seems to work fine, however when we try to add an editable DNN pane (<div id="HeaderPane" runat="server" ></div>) to the Header.ascx file, when the site loads DotNetNuke will not make that pane an area that modules can be inserted into. It is like it doesn't recognize it.
I have looked around the DNN Forums and googled, but not able to find a solution. The only thing that kind of resembled something like this was a custom skin object. What is the correct DotNetNuke way to do something like this and have it work as expected?
Thanks!