Dear all
First of all the question: How do I refer my own style sheets (in the Style Library library) in Sharepoint 2013 directly in the master page-html file?
I googled a lot and tried those approaches:
- http://social.technet.microsoft.com/Forums/hr/sharepointgeneral/thread/73713c74-00fc-4166-b612-2096a8065423
- http://panvega.wordpress.com/2009/04/01/sharepoint-masterpages-css-registrations-approaches/
- http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.cssregistration.aspx
- http://msdn.microsoft.com/en-us/library/ms431831.aspx
- http://www.ashokraja.me/post/Refer-Scripts-and-CSS-Style-Sheet-in-SharePoint-2013-Visual-Web-Part-and-Master-Page.aspx
Concerning the design of Sharepoint we used to link our stylesheets in the HTML master page using the$SPUrl token.
This is because we are coding the Design in-house and aim to deploy it (automated or semi-automated) to our client servers – therefore we need to use relative paths.
e.g. (SP2010): <SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/Themable/client/style.css %>" runat="server" After="true"></SharePoint:CssRegistration>
Result:
Sorry, something went wrong
So I tried the same approach for SP2013 using the new SP 2013 approach:
<!--SPM:<SharePoint:CssRegistration Name="<% $SPUrl:~SiteCollection/Style Library/Themable/customer/style.css %>" After="corev15.css" runat="server"/>
And dozens of little different path variations (including non-relative paths like:https://myserver/path/to/css/ for testing reasons, just to be sure.)
But it didn’t work.
I also tried to use the regular <link href> tag (this works, but is not relative, so no solution for my issue!) I detected (in my point of view) a weird issue:
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/9a77eca4-8d88-479a-8127-6716ed5f7a40/#9a77eca4-8d88-479a-8127-6716ed5f7a40
Any Ideas?