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, ...how can I include a header or a footer file/content inside a skin?how can I include a header or a footer file/content inside a skin?
Previous
 
Next
New Post
4/13/2015 6:59 AM
 

I have several skins and they all have the same header and footer.

I am duplicating the content for the header and footer and so I am wondering what the best way is of inserting an external header/footer file please?

thanks

 
New Post
4/13/2015 9:13 AM
 
Mark,

You are not too specific about what the external file is, therefore I don't have too much idea about what you are trying to achieve. If it is an HTML file you can add an iframe to your footer, but that is propably not a good idea (regarding different screen widths etc.) What you could do is using a Placeholder, read the file in code-behind and write the content to the Placeholder, or things like that.

If this is always the same file, why don't you replace the footer with the necessary contents in the skin file? Or does it have to be dynamic in any way?

If you want the client to be able to edit the content, you can use the TEXT tag and put the content in the resource file.

Happy DNNing!
Michael

Michael Tobisch
DNN★MVP
dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
4/13/2015 9:14 AM
 

...found one option -

1. I have registered the tag thing in my skin file like so:
        <%@ Register TagPrefix="dnn" TagName="MYFOOTER" Src="~/Admin/Skins/myfooter.ascx" %>

 

2. Called the footer tag:
        <dnn:MYFOOTER runat="server" id="MYFOOTER"  showLinks="True" />

 

3. Created a .ascx.cs file (just copied and pasted an existing one and referenced myfooter.ascx :

#region Copyright
#endregion
#region Usings
using System;
#endregion

namespace DotNetNuke.UI.Skins.Controls
{
    public partial class myfooter : SkinObjectBase
    {
        private const string MyFileName = "myfooter.ascx";
        public string Text { get; set; }
    }
}


4. Created the .ascx file:

<%@ Control Language="C#" AutoEventWireup="false" Inherits="DotNetNuke.UI.Skins.Controls.myfooter" CodeFile="myfooter.ascx.cs" %>
<asp:label id="lblmyfooter" runat="server" enableviewstate="False"></asp:label>
<html>
 <body>
  test footer content here!
 </body>
</html>


I don't what I needed to include in .cs file or if this is the best way of doing things, but it works.

 
New Post
4/13/2015 9:39 AM
 
Michael Tobisch wrote:
If this is always the same file, why don't you replace the footer with the necessary contents in the skin file? Or does it have to be dynamic in any way?
If you want the client to be able to edit the content, you can use the TEXT tag and put the content in the resource file.

 Thanks Michael,

Yes, I think it will always be the same file.
It won't be dynamic - just a css megaMenu for the header and a footer with html links.

'replace the existing dnn footer'? - we're not using one, unless it was deleted/removed when we first set up dnn - is this done via languages?

Or, I suppose we could use a standard html module and use the 'apply to every page' option?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...how can I include a header or a footer file/content inside a skin?how can I include a header or a footer file/content inside a 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.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out