Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Custom control with DNN Pane in DNN Skin.Custom control with DNN Pane in DNN Skin.
Previous
 
Next
New Post
2/4/2011 12:25 PM
 
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!
 
New Post
2/5/2011 3:11 AM
 
You are correct in saying that dnn does not recognize it.

To work out where the content panes are located on a skin, dnn does some trickery - basically it searchers thru the objects defined on the skin
 - basically looking for any objects that are <p> <div> <td>  container type objects.

the act of assigning and id=HeaderPane and runat=server to <div> actually tells the skin to create an object of class <div inside the skin object.

However, it only searches thru the skin object itself - that is it examines container objects directly on the skin
 ... as a result it has no understanding that it would need to drill down into your header object 
looking for a <div> container buried inside it.

As a result,  any  <div id="HeaderPane" runat="server" ></div>  needs to be on the skin itself.

And I would suggest that a custom skin object would not change where the <div id=HeaderPanel  needs to be defined.

Having said that - it may be possible to create a custom skin object that could be used to directly place a editable html area in your header.

Westa

PS was actually kinda surprised the MENU provider object worked in your header.ascx container - would have thought that it may have expected a skin as its parent - but then again mmm i guess no real need for that.
 
New Post
2/7/2011 9:31 AM
 
Thanks for the help!

I will look into the custom skin object thing you mentioned.    Too bad DotNetNuke doesn't support this type of functionality. 

On a side note, we have also found out that if you use the old asp style <!--#include file="header.html"--> and make the header control an html file, DNN is able to find content pane's inside of the header.html file.  Of course, this is not correct syntax in a .net project and visual studio will complain the whole time.  But it does work.

 
New Post
2/8/2011 3:47 AM
 
I always use the includes for this as it's the only way I know that works.
<!--#include file="header.html"-->
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Custom control with DNN Pane in DNN Skin.Custom control with DNN Pane in DNN Skin.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out