Domanda

I have a custom CSS file is in 14\TEMPLATE\LAYOUTS\MyStuff folder. Masterpage markup contains the following:

<SharePoint:CssLink runat="server" Version="4"/>
<SharePoint:Theme runat="server"/>
<SharePoint:ULSClientConfig runat="server"/>
<SharePoint:CssRegistration runat="server" Name="/_layouts/MyStuff/my_style.css" After="corev4.css"/>

The problem is that CSS links are not added to the page at all as if CssLink gets rendered to nothing. At the same time, the CSS is accessible via http://mysite/_layouts/MyStuff/my_style.css. Moreover, I have several sripts in the same folder linked to master page like this:

<SharePoint:ScriptLink runat="server" Name="/_layouts/MyStuff/thescript.js" />

and this works just fine. What am I missing?

È stato utile?

Soluzione

Is your site running in 2007 compatibility mode by chance? If so, that Version="4" is what is preventing it from rendering as the page itself is trying to render as Version="3" and would ignore all version 4 controls.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top