More in this section

Forums / General Discussions / Resource Links

Resource Links

4 posts, 0 answered
  1. Doug Dawson
    Doug Dawson avatar
    21 posts
    Registered:
    18 Aug 2009
    06 Oct 2010
    Link to this post
    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!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    06 Oct 2010
    Link to this post
    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
  3. Doug Dawson
    Doug Dawson avatar
    21 posts
    Registered:
    18 Aug 2009
    06 Oct 2010
    Link to this post
    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!
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    07 Oct 2010
    Link to this post
    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
4 posts, 0 answered