문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top