Image Gallery reloads page each time I click next

Clyde Timbs asked on September 28, 2017 16:26

We have recently moved from Kentico 7 to 10. I have found that all the lightbox style galleries no longer function. In replacing them with the image gallery web part, we now have an issue. After clicking on a thumbnail to view the larger image, clicking next causes the page to reload, cycling it back to the top.

I have turned on the "use update panel" option on the AJAX section of the gallery web part, but the problem remains. Is there a simple fix for this?

Thank You

Recent Answers

Trevor Fayas answered on September 28, 2017 19:33

Are there any Javascript errors that you see when you click next? Do you have a link to the page this is on that i can take a look?

0 votesVote for this answer Mark as a Correct answer

Clyde Timbs answered on September 28, 2017 20:27

Here is one spot -

Thanks for any help.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on September 29, 2017 03:42

I only had a chance to take a quick look at it, i'll have to take a look at the webpart logic that runs it, however what would probably be recommended is you diverge from using that built in lightbox as depends on reloading the page (it generates a link to the current page with some URL parameters that then i believe will 'trigger' a larger view of it), and instead use a repeater and your own jQuery plugin. It will be a lot more flexible as you can pick and configure as you want.

Fancybox is a great plugin for example, just include the javascript and use a Repeater to display the file objects you want and render them to match the HTML format required.

I'll hopefully get back to you sometime early next week when i can get back at the office to take a look.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 29, 2017 16:32

The problem with your current setup is that the way the built in navigation works is it creates a link to a new page. Thus navigating away from the current page to a new page, which is why it "refreshes".

As Trevor suggests, I'd look into using your own plugin for this. They are typically easy to implement in Kentico and you can use a simple repeater to display the images vs. the current webpart you're using. Since you're already using Bootstrap, you could use the plugin with bootstrap but it's somewhat old. You could also use the Fancybox as Trevor mentions. I'm also partial to using BXSlider as the implementation is simple and overall is a simple setup for most any slider or gallery setup.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.