Design and CSS styles
Version 5.x > Design and CSS styles > content slider webpart displays everthing first then randomly go thru the list View modes: 
User avatar
Member
Member
Willy - 6/13/2011 10:46:01 PM
   
content slider webpart displays everthing first then randomly go thru the list
Hi,

I used the content slider to randomly rotate our customers feedback on the homepage. However, when a connection speed is slow, the webpart tries to display everything first causing all the text to overlap each other. After which, it normally displays the 1st to the last...

Please advise how I can avoid the webpart to display everything and should only dipslay the 1st entry.

It's now disabled on homepage until we've resolve this.

User image

Willy

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/14/2011 4:18:24 AM
   
RE:content slider webpart displays everthing first then randomly go thru the list
Hi Willy,


the Content slider displays all the items and the JavaScritpt hides and shows the particular documents. If it displays all the documents, do you need to refresh the page or you can only see that for a while and then it starts to work without a refresh? It seems the JavaScript is not loaded whilst the document content is.

If you test a simplified version of Content slider (less pages and less size of documents), does it work? Do you use cache for the Cotent slider? You could use a static unique cache item name to share the cache for all users and speed up the content of content slider. Please see here: Optimization tip tip for more details.


Best regards,
Helena Grulichova

User avatar
Member
Member
Willy - 6/14/2011 4:31:33 AM
   
RE:content slider webpart displays everthing first then randomly go thru the list
Hi Helena,

I don't need to refresh the page. It only happens on every page load, all the text overlapping, then will disappear, then will normally slide all entries.

I think your first theory is right, it loads all document content before the javascript causing the overlapping of all text.

what do you mean by less pages? you mean lessen the number of document to rotate? i think even if there's only 10 document, they will still overlap.

maybe to try to load the JS first before the content? how can I do this?

many thanks,
Willy

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/14/2011 6:27:56 AM
   
RE:content slider webpart displays everthing first then randomly go thru the list
Hello,


I would recommend you to set up cache because it would speed up loading. The JavaScript is registered in the OnPreRender method of ~\CMSWebParts\Viewers\Effects\ContentSlider.ascx.cs. You could clone the web part and play with the code as well.

Yes, you got my point but 10 documents are not a lot. It should not affect the behavior. You can also consider a Scrolling text web part instead of Content slider.


Best regards,
Helena Grulichova

User avatar
Member
Member
Willy - 6/14/2011 8:33:06 PM
   
RE:content slider webpart displays everthing first then randomly go thru the list
I tested scrolling text following the same configuration as the content slider, however it doesn't work. No text was scrolling.

Is there any other config I could have missed out?

Thanks
Willy

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/15/2011 3:52:35 AM
   
RE:content slider webpart displays everthing first then randomly go thru the list
Hi Willy,


1. Do you use a custom JavaScript on your page? Can you see any JavaScript errors on the page?

2. Could you please test the Scrolling web part on a blank page which does not inherit any content (neither the master page)? Does it work?

3. If you install a sample Corporate site, do the Scrolling news work on the Home page?

4. What version of Kentico CMS do you use? (The build number would be helpful.)


Best reagrds,
Helena Grulichova