How do you 'install' the Kangaroo Add References Widget?
I downloaded the <b>Kangaroo Add References Widget</b> from the Marketplace, but I'm not sure how to actually use it. I'm still have issues when trying to add references to custom javascript files. I'm looking for a reliable way to get the scripts to load in the order I want them to and thought that maybe this Kangaroo deal would do the trick, but again I don't know how to get it working. Also since the update to the Sitefinity website it appears that the Kangaroo widget is no longer available in the Marketplace...?
Any help would be appreciated...?
or if anyone has a better fool proof way of using javascript plugins that would be great. I didn't think it would be so tricky to use plugins, but apparently it is.
I'm trying to use a Google Maps jQuery plugin and I can't for the life of me get it to work.
Thanks!
Hi Richard,
Thanks for using Sitefinity.
Take a look at these posts about implementing jQuery and even about the latest updates to Kangaroo widget:
Post 1
Post 2
Let me know if these don't clear up your problems.
That's funny Patrick you linked me to two of my own posts...
Hello Richard,
Actually, you have several options when using javaScript on Sitefinity pages. You can use our JavaScript widget. Here's more information about it (which is javaScriptEmbedControl). Here's some additional information about it:
www.sitefinity.com/.../configuring-the-java-script-widget
Another option would be to use a ResourseLinks control:
www.sitefinity.com/.../resourcelinks-control
Here's an example on how to add a google Map to a widget template:
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <script src="http://maps.google.com/maps?file=api&v=2&key=Paste the GOOGLE MAPS API key here"type="text/javascript"></script><script type="text/javascript"> //<![CDATA[ function load() if (GBrowserIsCompatible()) var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); var MapTypes = map.getMapTypes(); MapTypes[0].getName= function() return "text 1"; MapTypes[1].getName = function() return "text 2"; MapTypes[2].getName = function() return "text 3"; map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(52.173931692568, 18.8525390625), 6); var marker = new GMarker(new GLatLng(52.173931692568, 18.8525390625)); map.addOverlay(marker); //]]></script> <div><div id="map" style="width: 790px; height: 450px; background: url(http://geofinder.web4you.com.pl/template/loader.gif); background-repeat: no-repeat; background-position: center;"></div><div style="padding-top:10px; text-align: right; width: 790px;"><a href="http://geofinder.web4you.com.pl"><img src="http://geofinder.web4you.com.pl/geofinder1.gif" alt="Geofinder Google Maps generator" border="0" width="80" height="15"></a></div></div> <telerik:RadListView ID="NewsList" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false"> <LayoutTemplate> <sf:ContentBrowseAndEditToolbar ID="MainBrowseAndEditToolbar" runat="server" Mode="Add"></sf:ContentBrowseAndEditToolbar> <ul class="sfnewsList sfnewsListTitleDateContent"> <asp:PlaceHolder ID="ItemsContainer" runat="server" /> </ul> </LayoutTemplate> <ItemTemplate> <li class="sfnewsListItem"> <h2 class="sfnewsTitle"> <sf:DetailsViewHyperLink ID="DetailsViewHyperLink1" TextDataField="Title" ToolTipDataField="Description" runat="server" /> </h2> <div class="sfnewsAuthorAndDate"> <asp:Literal ID="Literal2" Text="<%$ Resources:Labels, By %>" runat="server" /> <sf:PersonProfileView ID="PersonProfileView1" runat="server" /> <sf:FieldListView ID="PostDate" runat="server" Format=" | PublicationDate.ToLocal():MMM dd, yyyy" /> </div> <sf:FieldListView ID="NewsContent" runat="server" Text="0" Properties="Content" WrapperTagName="div" WrapperTagCssClass="sfnewsContent" /> <sf:CommentsBox ID="itemCommentsLink" runat="server" CssClass="sfnewsCommentsCount"/> <sf:ContentBrowseAndEditToolbar ID="BrowseAndEditToolbar" runat="server" Mode="Edit,Delete,Unpublish"></sf:ContentBrowseAndEditToolbar> </li> </ItemTemplate></telerik:RadListView><sf:Pager id="pager" runat="server"></sf:Pager><asp:PlaceHolder ID="socialOptionsContainer" runat="server" /><%@ Control Language="C#" ....... %>Change the script. Paste the GOOGLE MAPS API key there.
$(document).ready(function() var MapDiv=document.getElementById("map"); var myLatlng = new google.maps.LatLng(38.899501, -77.031656); var myOptions = zoom: 8, center: myLatlng, var map = new google.maps.Map(MapDiv, myOptions);) $('body').attr("onload","load()");Keep in mind both resourcelinks and the javascript embed control with yield endless frustrating and random results...
Hey Jen thanks for that example! I'm not sure what to put for the <%@ Control Language="C#" ....... %> part. What needs to go where you've put ..........? And will this automatically get updated when I update to the latest version of Sitefinity?
Thanks!