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

Forums / Developing with Sitefinity / Library rotator no looping

Library rotator no looping

6 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    26 Oct 2009
    Link to this post
    Hi Team,

    I have some problem to looping my rotators. I have searched some errors like not compliant xhtml but nothing all well formed. I have similar problems with simple or more complex rotators in same or differents pages but using same method for binding contents ItemDataBound. I cant looping in FF and The result in not same in IE8(2items in place one) or IE8(7complaint better but infamous). Some Advice?. Thanks

     protected void Page_Load(object sender, EventArgs e)     
        {     
            IList images = null;     
                 
            if (this.manager == null)  
                this.manager = new LibraryManager(LibraryProvider);  
            ILibrary library = this.manager.GetLibrary(LibraryName);    
                 
            if (library != null)     
            {     
                images = library.GetItems();     
                     
            }     
            RadRotator1.DataSource = images;     
            this.RadRotator1.ItemDataBound += new RadRotatorEventHandler(ItemDataBound);      
            RadRotator1.DataBind();     
        
        }     
        void ItemDataBound(object sender, RadRotatorEventArgs e)     
        {     
            IContent cnt = e.Item.DataItem as IContent;     
            if (cnt != null)     
            {     
        
                Image img = e.Item.FindControl("ImgRotator") as Image;     
                if (img != null)     
                    img.ImageUrl = cnt.UrlWithExtension;     
            }     
        }  
        <telerik:RadRotator runat="server" ID="RadRotator1" Width="270" Height="310">     
            <ItemTemplate>    
                <asp:Image runat="server" ID="ImgRotator" Width="270" />    
            </ItemTemplate>    
        </telerik:RadRotator>  

  2. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    01 Jun 2017
    26 Oct 2009
    Link to this post
    Hello Pierre,

    Can you try adding Height to the asp:Image:

    <asp:Image runat="server" ID="ImgRotator" Width="270" Height="310" />

    Then after the page loads clean the browser cache(Ctrl+F5).

    Sincerely yours,
    Nikolai
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    26 Oct 2009
    Link to this post
    Hi Nikolai,

    Is not fixing, same problem. I have tried with itemstemplates full defined Height, width and same for Rotator.  You could try with this sample found by yourself. All rotators are not looping in FF, image or text content is similar.

    http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/rotator-showing-news-as-a-ticker.aspx

    Regards
     
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    26 Oct 2009
    Link to this post
    Hello Pierre,

    I am using the following control without problems

    protected void Page_Load(object sender, EventArgs e)
       {
     
           var LibManager = new LibraryManager("Libraries");
           ILibrary libraryName = LibManager.GetLibrary("Images");
           IList contentItems = LibManager.GetImages(0, 0, string.Empty, new Guid[] { libraryName.ID });
           rotator.DataSource = contentItems;
           rotator.ItemDataBound += new Telerik.Web.UI.RadRotatorEventHandler(rotator_ItemDataBound);
           rotator.DataBind();
     
       }
     
       void rotator_ItemDataBound(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
       {
           IContent cnt = e.Item.DataItem as IContent;
           Image img = e.Item.FindControl("CustomerImage") as Image;
           if (img != null)
           {
               img.ImageUrl = cnt.UrlWithExtension;
           }
       }

    control template

    <telerik:RadRotator ID="rotator" runat="server" Width="300" Height="300" RotatorType="AutomaticAdvance" ScrollDirection="Right">
    <ItemTemplate>
    <asp:Image ID="CustomerImage" runat="server" />
    </ItemTemplate>
     
    </telerik:RadRotator>


    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    26 Oct 2009
    Link to this post
    Hi Ivan,

    Thanks, I have lost my day today in this issue. I have tested your sample in some configurations. It's seems some problem with masterpage and my Theme. If i use in one page alone, work. In one master page no Theme, works, but when I add my Theme to the page i have this issue. Using firebug you can get nothing. Others standard themes have not the issue.
    After some searching i have found is one generic "ul width=100%;" that generate this issue in FF. I apologize for the post.

    I have another problem in IE8 after seen the first item of Rotator. I using one img and some text including one big H2. The first item is smooth but the second and the next are very bad rended in Ie8 or Ie8(Ie7), no smooth for cleartype fonts but fine in others nav. ClearType is on in my dev machine on. Some walk around?

    Regards
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Oct 2009
    Link to this post
    Hello Pierre,

    Can you share the code you use, so we could see what is going wrong?

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered