Resource Links

Posted by Community Admin on 03-Aug-2018 20:07

Resource Links

All Replies

Posted by Community Admin on 06-Oct-2010 00:00
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!
Posted by Community Admin on 06-Oct-2010 00:00
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>


Sincerely yours,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 06-Oct-2010 00:00
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" />

What did I do wrong?

Thanks!
Posted by Community Admin on 07-Oct-2010 00:00
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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
This thread is closed