Monday 5 October 2015

DotNetNuke Hosting Tips: Adding jQuery To Your DNN Skin

Leave a Comment
At this time you’ll be hard pressed to seek out a website that doesn't use jQuery. it's become a requirement for several to bring flash like experience in the form of photo sliders or quick responding Ajax applications.
DotNetNuke Hosting Tips: Adding jQuery To Your DNN Skin
Over that point adding jQuery to DotNetNuke (DNN) has not continuously been simple. DNN ships jQuery as a part of the core framework and you would possibly assume that it’s always offered. however one of the most widely unknown problems is that it should be requested on every page in order for it to be available.

Common Symptoms:
  1. Main menu doesn't show sub items.
  2. Homepage slider doesn't rotate.
  3. Layout is deformed.
  4. Works fine once logged in but not when logged out
When you login as an administrator jQuery will always be available since the control panel bar request it. However if you logout on that same page it might not have been requested by any module or skin object on that page.

Not Recommended Ways To Add jQuery

Do Not: Add script tag into page settings or in your skin file.

Why? This will potentially add multiple jQuery reference to your page. The real issue is if any plugins are registered between the first reference and the second reference they won’t be available after the second reference is instantiated. 
<script type="text/javascript" src="//"></script>

Recommended Way To Add jQuery

In your skin file you you can reference and add the control for jQuery. This will ensure that jQuery is available on every single page and that it will only be referenced one time. You also get the benefit of the Client Dependency Framework (CDF).

<%@ Register TagPrefix="dnn" TagName="jQuery" src="~/Admin/Skins/jQuery.ascx" %>

<dnn:jQuery runat="server"></dnn:jQuery>

You can optionally add public properties to register jQuery UI, DNN jQuery Plugins and Hover Intent.

<dnn:jQuery runat="server" jQueryUI="true" DnnjQueryPlugins="true" jQueryHoverIntent="true"></dnn:jQuery> 

Note: The search skin object will also register jQuery. 

DotNetNuke 7.4.1 Hosting Recommendation

HostForLIFE offers you the latest DotNetNuke version hosting with unlimited domain, unlimited diskspace and bandwidth. With the 1-click Plesk Panel tool installer you will have installed DotNetNUke 7.4.1 in a couple of minutes with no complex settings and necessary technical skills. To see more information, you can go to their official site. hosting


Post a Comment