Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Lightbox functionality not working until all thumbnail images load onto page View modes: 
User avatar
Member
Member
pspalmer - 2/5/2013 1:34:04 PM
   
Lightbox functionality not working until all thumbnail images load onto page
I'm using Kentico 7. The lightbox is working great except for the fact that all thumbnail images have to be loaded on the web page before I can actually use the lightbox's functionality.

For example, if I load the gallery page (lightbox webpart enabled on this page) and click on a thumbnail before all thumbnails are loaded, the full-sized image is displayed via the browser's image rendering system and not the lightbox. This is not good because the user has to go "back" to the gallery I've set up, wait for all thumbnails to show and then click an image for the lightbox to function.

Any ideas on how to remedy this issue? If you need more information, let me know.

Thanks!

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 2/6/2013 8:45:08 AM
   
RE:Lightbox functionality not working until all thumbnail images load onto page
Hi,

Unfortunately it's not possible to change this behaviour because it's standard behaviour of the LightBox plugin. The whole page must be loaded after LightBox is able to get all the elements.

1. You can improve the loading time by setting a caching
2. The loading time will be also improved by optimizing an image size (smaller = faster)

I hope this will help you.

Best regards,
Martin Danko

User avatar
Member
Member
pspalmer - 2/6/2013 8:56:35 AM
   
RE:Lightbox functionality not working until all thumbnail images load onto page
Ahhhh, gotcha. Ok, I'll try those options, although I believe caching might be on currently.

I do have another question. I currently have the files in the content tree (uploaded via the File Import method). There are quite a few (up to 60 per page and 130 total). I would like to keep the 60 per page for aesthetic reasons. I have seen posts regarding the LightBox plugin and the media library. The posts I've seen refer to the LightBox not natively (without modification to code) being compatible with the media library in the current version. I'm not familiar with the code behind the system however I could probably take a stab at modifying it. Would you say that the files would load faster from the media library rather than the content tree setup? If so, I might opt for that method after all.

Thanks!
Shane

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 2/6/2013 9:48:44 AM
   
RE:Lightbox functionality not working until all thumbnail images load onto page
Hi Shane,

Yes, the Media library could be a better choice in this case.

The main difference is that files from content tree are all stored in the the database and threated like a documents of specific type CMS.File while the files from Media library are stored physically on the file system (disk). So accessing a large number of images will be definitely faster from the disk than from the database.

Best regards,
Martin Danko