Products

Solutions

Resources

Partners

Community

About

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...Using Modules a...Using Modules a...html5shiv Library - How to Properly Include it in a Skinhtml5shiv Library - How to Properly Include it in a Skin
Previous
 
Next
New Post
9/19/2015 12:59 PM
 

I have found a html5shiv Javascript library over at EngageSoftware's GitHub.  We are able to include common Javascript libraries in the <head> using the Javascript Libraries extension introduced in DNN 7.2.  Typically you can just write something as simple as this within your skin to include a common javascript library:

<%@ Register TagPrefix="dnn" TagName="JavaScriptLibraryInclude" Src="~/admin/Skins/JavaScriptLibraryInclude.ascx" %>
<dnn:JavaScriptLibraryInclude runat="server" Name="html5shiv" />

After looking at the HTML source, I see that the <script> is in fact being appended to the <head>.  Although from what I understand, you are supposed to wrap the shiv script between a comment tag.  We would want the source to end up to be something like this:

<!--[if lt IE 9]>  
<script src="/Resources/libraries/html5shiv/03_07_03/html5shiv-printshiv.min.js?cdv=25" type="text/javascript"></script>
<![endif]-->

Would anyone happen to know the best way to achieve this?  Thanks!

 
New Post
9/21/2015 10:24 AM
Accepted Answer 

Using the Client Resource Management framework (on which the JavaScript Library framework resides), there isn't a good way to customize the markup used to include the script.  In this case, including it without the conditional comments is a small performance hit on modern browsers, but doesn't cause any problems in functionality.  If you really want to avoid the download on modern browsers, you'll need to include the library manually.

Hope it helps!


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
9/21/2015 11:00 AM
 
I wasn't sure if using it without the conditional statement would break anything on other browsers. That's all I needed to know! Thanks Brian.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...html5shiv Library - How to Properly Include it in a Skinhtml5shiv Library - How to Properly Include it in a Skin


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