Is there anyway to use another list not built on Announcements

Oct 29, 2010 at 7:48 PM

I like the jquery and find it quite useful for displaying fields on a list templated from announcements.  I'm not sure what the limitation is at this point--but I was not able to connect it to other customlists or forms.

 

thanks for your work.

 

Stephan

Nov 22, 2010 at 7:13 AM

Yes Stephan, It is possible to use the same jQuery to rotate the custom list items.

To do that, Open the jquery.SPItemsRotator-0.1.2.js in Note pad or any javascript editor. Update Bolded lines with your Custom List field.

//Can be used with a standard announcements list
jQuery.fn.rotateAnnouncements = function(options){

    var opts = $.extend({
        displayDuration:10000,
        fadeDuration:1500,
        CAMLViewFields:"<ViewFields><FieldRef Name='Body' /></ViewFields>",
          
        CAMLQuery:"<Query><Where><IsNotNull><FieldRef Name='Title' /></IsNotNull></Where></Query>",       //row matching condition for my custom list.
        itemHtml:"{ows_Title}" // denotes the Title Column from my custom list , (ows_Title is the web service name for the Title Column);
    }, options);


    return this.rotateItems(opts);

 

Also update the code snippet in content query werb part, as follows.

<div id="divPictures" style="height:200px;"></style>
<script>
   $(window).ready(function(){
    $("#divPictures").rotateAnnouncements({
        webURL:"/",
        listName:"My List" //my Custom List
   
    });
   });
</script>

 

Regards,

venkat

 

 

Nov 22, 2010 at 10:29 PM

Thank-you

From: gvraman81 [mailto:notifications@codeplex.com]
Sent: Monday, November 22, 2010 1:13 AM
To: sonisick@gmail.com
Subject: Re: Is there anyway to use another list not built on Announcements [spitemsrotator:232826]

From: gvraman81

Yes Stephan, It is possible to use the same jQuery to rotate the custom list items.

To do that, Open the jquery.SPItemsRotator-0.1.2.js in Note pad or any javascript editor. Update Bolded lines with your Custom List field.

//Can be used with a standard announcements list
jQuery.fn.rotateAnnouncements = function(options){

var opts = $.extend({
displayDuration:10000,
fadeDuration:1500,
CAMLViewFields:"<ViewFields><FieldRef Name='Body' /></ViewFields>",

CAMLQuery:"<Query><Where><IsNotNull><FieldRef Name='Title' /></IsNotNull></Where></Query>", //row matching condition for my custom list.
itemHtml:"{ows_Title}" // denotes the Title Column from my custom list , (ows_Title is the web service name for the Title Column);
}, options);


return this.rotateItems(opts);

Also update the code snippet in content query werb part, as follows.

</style>
<script>
$(window).ready(function(){
$("#divPictures").rotateAnnouncements({
webURL:"/",
listName:"My List" //my Custom List

});
});
</script>

Regards,

venkat

Read the full discussion online.

To add a post to this discussion, reply to this email (spitemsrotator@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email spitemsrotator@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com