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, ...Inserting jQuery into skin fileInserting jQuery into skin file
Previous
 
Next
New Post
5/24/2011 12:07 PM
 
I have just updated a number of my modules to use jQuery and in order for them to work I have had to add a number of inserts into my skin file, something like this:



<script type="text/javascript">!window.jQuery && document.write(unescape('%3Cscript src="<%=SkinPath %>AJAXScript/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script>
<script src="<%=SkinPath %>AJAXScript/DD_roundies_0.0.2a.js"  type="text/javascript"></script>
<script src="<%=SkinPath %>AJAXScript/jquery.blockui.min.js"  type="text/javascript"></script>
<script src="<%= SkinPath %>AJAXScript/jquery.MetaData.js"    type="text/javascript"></script>
<script src="<%= SkinPath %>AJAXScript/jquery.rating.js"      type="text/javascript"></script>
<script src="<%=SkinPath %>AJAXScript/jquery.json.min.js"     type="text/javascript"></script>
<script src="<%=ApplicationPath %>/js/iSuite.js"              type="text/javascript"></script>
<script src="<%= ApplicationPath %>/js/HRGCombinedScripts.js" type="text/javascript"></script>
<script type='text/javascript'>jQuery.noConflict();</script>




The problem I have is that I have several separate skin pages within each package AND I have dozens of skin packages.







At present I am faced with amending every page within every skin package to insert this code.







Can anyone suggest a better way of doing this, preferably without changing any core code.



 
New Post
5/26/2011 7:26 AM
 
Why not create a user control that inserts this jquery, and add that user control to all the skin files you use?

Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
5/26/2011 7:38 AM
 
You could use our stylehelper skin object, which is made to inject javascript files (and a lot of other things): http://bit.ly/hDd2cE
 
New Post
5/26/2011 7:58 AM
 
Thanks for the suggestions.

However both of these require me to add entries to everyone of my skin files and there are 100's of these.

Is there any other way of doing this just the once?
 
New Post
5/26/2011 8:44 AM
 
This feels wrong to me.  The skin should not have to do somthing to let the module work.

I think you should have the module(s) call in the jQuery code.

That way the modules are self contained and they will work in any skin.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Inserting jQuery into skin fileInserting jQuery into skin file


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