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, ...Referencing JS file in Skin PathReferencing JS file in Skin Path
Previous
 
Next
New Post
4/16/2009 9:59 PM
 

Hello all,

I'm trying to add some customer javascript to my skin (DNN version 5).

Below is the top snippet from my ASCX skin file which works - however it is referencing the js file under DNNs standard js directory ("/js/AgentPlusScripts.js").

Can someone please explain to me how to get a reference to the path of the active skin so that I can store the js there?

Thanks very much in advance,

 

Damien

  

<%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Register TagPrefix="dnn" TagName="SOLPARTMENU" Src="~/Admin/Skins/SolPartMenu.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>
<%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/Admin/Skins/BreadCrumb.ascx" %>
<%@ Register TagPrefix="dnn" TagName="PRIVACY" Src="~/Admin/Skins/Privacy.ascx" %>
<%@ Register TagPrefix="dnn" TagName="STYLES" Src="~/Admin/Skins/Styles.ascx" %>
<%@ Register TagPrefix="dnn" TagName="NAV" Src="~/Admin/Skins/Nav.ascx" %>
<script runat="server">
     
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Page.ClientScript.RegisterClientScriptInclude("APScripts", "/js/AgentPlusScripts.js")
    End Sub
   
</script>

 

.... truncated rest of skin...
 

 
New Post
4/17/2009 5:09 AM
 

add <%=SkinPath%>

 
New Post
4/19/2009 7:02 PM
 

Thanks Timo :-)

 
New Post
5/21/2009 10:32 AM
 

Timo Breumelhof wrote

add <%=SkinPath%>

 

This actually throws an exception for us (4.x or 5.x) having to do with view_state not being loaded.   We've attributed it to AJAX and have written our own skin objects that sets the skin path in code, but what is really causing it?

 
New Post
5/21/2009 10:33 AM
 

Michael Sumerano wrote

 Timo Breumelhof wrote

add <%=SkinPath%>

 

 

This actually throws an exception for us (4.x or 5.x) having to do with view_state not being loaded.   We've attributed it to AJAX and have written our own skin objects that sets the skin path in code, but what is really causing it?

Actual Error:

Failed to load view_state. The control tree into which view_state is being loaded must match the control tree that was used to save view_state during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Referencing JS file in Skin PathReferencing JS file in Skin Path


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