Design and CSS styles
Version 7.x > Design and CSS styles > External typography CSS link View modes: 
User avatar
Member
Member
beau.cowan-rrpartners - 9/26/2013 4:32:00 PM
   
External typography CSS link
We are working on a project that involves using a font that we paid for and are having to use an external link to get to it.
<link rel="stylesheet" type="text/css" href="//cloud.typography.com/" />

When any of the pages render, Kentico will change the href="//cloud.typography.com/" into href="/cloud.typography.com/", removing one of the slashes in the beginning of the link.

Is there any method that I can use to keep this from happening? It's preventing the fonts from coming into both the CMSDesk and the live site, and we are doing this because of an SSL placed on the site. I'd rather not have to put an asp literal there to discern http vs https, especially when caching is involved. Want to prevent as many hiccups as possible.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 9/26/2013 11:01:42 PM
   
RE:External typography CSS link
I have this code in a user control and it loads just fine
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
I'd suggest removing the type="" attribute and see how this works for you. If I remember right there is some stripping that goes on with those particular tags. Also, where are you putting this html?

User avatar
Member
Member
beau.cowan-rrpartners - 9/26/2013 11:10:23 PM
   
RE:External typography CSS link
I tried that and it didn't do any good for either the CMS or main site when on localhost. Looks like it's doing that for the <link> tag in general. I've used your method for <script> tags as well with success, but I think that it's different with the <link> tag for some reason.

I guess that I'll just have to do the code behind method if it comes to that.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 9/27/2013 8:21:43 AM
   
RE:External typography CSS link
Where are you placing this html? If it is in any kind of WYSIWYG editor, it might strip out that info. If you have the ability to place it in your webpart in the HTML before or in your transformation that should work better. I've got mine in the ascx of a webpart without issue.

User avatar
Member
Member
beau.cowan-rrpartners - 9/27/2013 11:35:21 AM
   
RE:External typography CSS link
This is included in the Root.Master. It is not a part of a webpart, as it is header information and is included in the <head> tag, like all CSS link items are.

I have since just used a code behind method to check for SSL and adjust the link accordingly.