문제

Is it some how possible to include your custom css files in this control?

<SharePoint:CssLink runat="server" Version="4"/>

I usually wind up inserting the same 3 custom css files in the masterpage whenever I start a new SharePoint project. So I thought since the above control inserts all standard SharePoint stylesheets, I could maybe incluce my own css files in it. But is it possible?

도움이 되었습니까?

해결책

Yes, use the CssRegistration control to add your own CSS files. They are inserted into the page using the CssLink conrol in the masterpage.

Hint: Use the After property to load your css file after a specific file, such as 'corev4.css'. This will let you define the load order of your CSS.

You can insert your three instances of CssRegistration into a new UserControl in your project, and load this via a Delegate Control in a Feature, to insert your UserControl into the AdditionalPageHead delegate control.

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