Try Now
More in this section

Forums / Developing with Sitefinity / Implement jQuery plugin in the Blog widget

Implement jQuery plugin in the Blog widget

2 posts, 0 answered
  1. Johan
    Johan avatar
    17 posts
    18 Apr 2014
    15 May 2014
    Link to this post

    How do I add a jQuery plugin so that it is being used on every blog post widget that is used on the site, other than going to each page and drop in javascript widget? I know I could include the plugin on every page using .master file but that seems to be an overkill.


  2. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    15 May 2014 in reply to Johan
    Link to this post

    2 Options

    1) ResourceLinks Control
    Pros: if you have multiple blog widgets on a page (could happen) the script loads once
    Cons: You can't control the script position or load order

    2) JavaScriptEmbedControl (in Telerik.Sitefinity.Web.UI.PublicControls)
    Pros: Easy to use, can define if it renders in Head, InPlace, BeforeBodyEndTag
    Cons: Doesn't check to see if script is already loaded

    In EITHER case you want to add the markup to your widget templates in the backend

2 posts, 0 answered