Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top