+1-888-365-2779
Try Now
More in this section

trial?

3 posts, 0 answered
  1. Martin
    Martin avatar
    6 posts
    Registered:
    14 Sep 2012
    23 Sep 2012
    Link to this post
    I want to include jquery function within a master page but am not sure where the code needs to go? Where should I place this block within the master page? Does it go in the head or after the form tag?  (sf5.1)
        <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
    <sf:ResourceLinks ID="resourcesLinks" runat="server">
        <sf:ResourceFile JavaScript Library="JQuery" />
    </sf:ResourceLinks>
  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    24 Sep 2012
    Link to this post
    Martin,

    The Register Assembly part goes at the very top of the Master Page. The sf:ResourceLinks part can go just inside the form.

    Also, I think you'll need to close the space between "JavaScript" and "Library", like so:
    <sf:ResourceLinks runat="server" ID="sfResources">
        <sf:ResourceFile JavaScriptLibrary="JQuery" />
    </sf:ResourceLinks>

  3. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    26 Sep 2012
    Link to this post
    Hi guys,

    @Tim is perfectly right that the resourceLinks tagPrefix should be on the top of the template and after that you can use the control.  @Martin, here's some additional information about  the ResourceLinks control from our documentation and Gabe Sumner's blog post:

    http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/controls/utility-controls/resourcelinks-control 

    http://www.sitefinity.com/blogs/gabesumner/posts/11-09-01/how_to_use_jquery_and_other_javascript_libraries_in_sitefinity.aspx 

    Greetings,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered