Resource Links
There's a snipped in the docs for the recommended way of including CSS files. The docs aren't clear as to where this goes:
<
sitefinity:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
<
sitefinity:ResourceFile
Name
=
"Global/Reset.css"
/>
</
sitefinity:ResourceLinks
>
Does this go in the header of the master page or somewhere else?
Thanks!
Hello Doug,
These controls -ResourceLinks and ResourceFile are server controls and you could add them in the body of your master page or inside template of a control
sample
<%@ Control Language="C#" %>
<
sitefinity:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
<
sitefinity:ResourceFile
JavaScriptLibrary
=
"JQuery"
></
sitefinity:ResourceFile
>
<
sitefinity:ResourceFile
Name
=
"Skins/Vista.css"
/>
<
sitefinity:ResourceFile
Name
=
"Skins/Outlook.css"
/>
</
sitefinity:ResourceLinks
>
When I added the snippets to the master page, this is what I got:
Server Error in '/MySite' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unknown server tag 'sitefinity:ResourceLinks'.
Source Error:
Line 10: <
head
runat
=
"server"
>
Line 11: <
title
></
title
>
Line 12: <
sitefinity:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
Line 13: <
sitefinity:ResourceFile
Name
=
"Global/Reset.css"
/>
Line 14: <
sitefinity:ResourceFile
Name
=
"Global/Layout.css"
/>
Hello Doug,
You have to register "sitefinity" as a tag prefix with namespace "Telerik.Sitefinity.Web.UI" and assembly "Telerik.Sitefinity"
Best wishes,
Ivan Dimitrov
the Telerik team