0

Does there exist a free scrolling announcements web part that does not need custom code in a content editor web part to function?

I am designing a site template for use within my company. My manager would like a web part that scrolls an announcement list across the top of the page (vertically or horizontally, does not matter).

I could easily find JQuery code and place it into a content editor web part that would cause the Announcements list to scroll.

The problem there is that when these web parts are saved to a site template and the template is reapplied, all the GUIDs for the lists and web parts are changed. This breaks the scrolling functionality and requires modification of the code each time. I will not be an on-site administrator of this site and will not be present to change the code.

I need a solution that is configurable through the GUI, or always stays focused on a list named "announcements" within the current web (current site).

1

I think you can do this just by enhancing your jQuery code and including SPServices.

With SPServices, you can use the 'GetListCollection' operation to dynamically get the names and GUIDs for all lists in the current site. Then, you can identify the exact guid for the Announcements list and use that.

Here is a generalized example of what that call would look like:

  $().SPServices({     
   operation: "GetListCollection",
   completefunc: function (xData, Status) {
    $("#appendXML").val(xData.responseXML.xml);
    $(xData.responseXML).find("[nodeName=List]").each(function() {
     var img_URL = $(this).attr("ImageUrl");
     var list_Title = $(this).attr("Title");
     var list_URL = $(this).attr("DefaultViewUrl");
     var list_Desc = $(this).attr("Description");
     var list_Created = $(this).attr("Created");
     var list_Modified = $(this).attr("Modified");
     var list_ItemCount = $(this).attr("ItemCount");
     /////etc.......

   }
  });
  • Thanks for the suggestion! If I get some time at the office I will try to implement something like that. A non-code solution would be awesome but I am probably just asking too much :P The help is appreciated! – Shrout1 Jan 31 '14 at 14:51
  • Yes, I understand where you are coming from. The silver lining on this cloud is that once you master some jQuery and SPServices magic, you can make SharePoint do pretty much whatever you'd like, ie, rainerat.spirit.de/2013/04/08/… and blog.meligo.be/2013/08/… – tyshock Jan 31 '14 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.