0

Whenever I try to make a custom skin object in Admin/Skins folder or Admin/Containers folder, I get the error Uncaught ReferenceError: jQuery is not defined

I'm trying to add a bootstrap link skin object to be used in the template. DNN Newbie here!

<%@ Control Language="C#" AutoEventWireup="false" Inherits="DotNetNuke.UI.Skins.Skin" Codebehind="Button.ascx.cs" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke.WebControls" %>

<asp:button id="btnButton" runat="server" cssclass="Normal" enableviewstate="False" MouseOverCssClass="LabelEditOverClass"
    ToolBarId="titleToolbar" LabelEditCssClass="LabelEditTextClass" EditEnabled="True" EventName="none" LostFocusSave="false"></asp:button>


<DNN:DNNToolBar id="titleToolbar" runat="server" CssClass="eipbackimg containerTitle" ReuseToolbar="true"
    DefaultButtonCssClass="eipbuttonbackimg" DefaultButtonHoverCssClass="eipborderhover">
    <DNN:DNNToolBarButton ControlAction="edit" ID="tbEdit2" ToolTip="Edit" CssClass="eipbutton_edit" runat="server"/>
    <DNN:DNNToolBarButton ControlAction="save" ID="tbSave2" ToolTip="Update" CssClass="eipbutton_save" runat="server"/>
    <DNN:DNNToolBarButton ControlAction="cancel" ID="tbCancel2" ToolTip="Cancel" CssClass="eipbutton_cancel" runat="server"/>
</DNN:DNNToolBar>

Edit: I'm trying to create various skin objects like button, title tags, body tags, which take in our CSS styling. So the Marketing department can just drop it to a location, edit the text/link of the button or edit the text in title, etc.

Sanaa
  • 1
  • 1

1 Answers1

0

Looking a bit further, DNN does NOT load jquery automatically. You need to set up your custom skin to load it.

See: https://www.dnnsoftware.com/wiki/client-resource-management-api

The short answer to your question is that you can do all of this using the user control DnnJsInclude. Note that there is also a DnnCssInclude control.

As I understand things (from the referenced item), these load the js and CSS files only if they have not yet been loaded.

If you are looking for a model for a DNN Theme, have a look at nvQuickTheme on GitHub.

Thanks to Will Strohl for pointing me in the right direction ...

Joe Craig
  • 1,244
  • 1
  • 7
  • 7