How to install jquery plugin in DotNetNuke?

I need to figure out how to install the new jQuery plugin in DotNetNuke (DNN)

I am very good at jQuery and I know how to link to source files, etc.

I need to figure out where to include the <script> tag in the code to enable the new plugin.

I am currently using script / CSS plugin tags inside the HTML module of any page.

I want to include js / cs in the file header or footer.

+4
source share
1 answer

There are several options. With DNN 6.x or higher, you should usually use the client resource management API to register files. It is really very simple since you just need to register the control:

 <%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %> 

And then include the specific file:

 <dnn:DnnJsInclude runat="server" FilePath="jquery.cycle.min.js" PathNameAlias="SkinPath" /> 

Usually we do this through the skin, because we make custom skins for most of our sites, or if we create a custom module that needs a plugin, we will do this in the corresponding ascx file for the module.

If you need only a plugin on a specific page, and not for a specific module, the best place to add it can be found in the section "Page Settings → Advanced → Page Title".

You can find out more here: http://www.dotnetnuke.com/Resources/Wiki/Page/Client-Resource-Management-API.aspx

+6
source

All Articles