Jump to content

Some clickthrough links not working in Image Gallery block

Recommended Posts

My website landing page is setup as one big image gallery with thumbnail images linking to other individual pages. It's been working fine for years but recently has stopped directing my clickthrough URL links to the other pages. Image tabs in the Gallery just go to a slideshow now, which is not what I want. I've tried re-uploading the image files and changing the URL links to the web page addresses (instead of the clickthrough > content option) but it still won't work. Old links still seem to be fine but any new image links just go to slideshow.

 

Can anybody help me out here? I'm unable to share new work until I get this figured out.

 

Thanks

Link to comment
  • Replies 10
  • Views 2.2k
  • Created
  • Last Reply

Top Posters In This Topic

Please post the URL for a page on your site where we can see your issue.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works.

Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 2 weeks later...
On 11/1/2022 at 11:15 AM, LonniWong said:

i have a similar issue.

It appears to me that even though SS provides the clickthrough field, they don't actually add the HTML link into the code.

Update 01/05/23

Please see Gallery page clickthrough URLs by template for which v7.0 templates have or don't have the clickthrough feature.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 2 months later...

Hey thanks, @creedon . My website is publicly viewable at https://www.andrewhaener.com/ I just added a new image that's got this same problem happening. The images and links I was asking about initially resolved themselves after a few days for desktop access but they still don't work on mobile.

 

I'm running this code injection which I found on a forum posting in the gallery block gear. It's worked for most of the clickthru links but not the new ones. If you could take a look at some of this stuff I'd very much appreciate it. Thanks.

 

<script>
 var currentPageBaseURL=window.location.href.split("?")[0];
   Y.on("domready",function(e){
       Y.io(currentPageBaseURL+"?page=1&format=json-pretty", {
         on:{success: jsonLoaded}
     });
     function jsonLoaded(err,data){
       var jsonResponse = Y.JSON.parse(data.responseText);
       var items=jsonResponse.items
       Y.all("#thumbList .thumb, #slideshow .slide").each(function(e){
         var thumbId=this.getAttribute("data-slide-id");
         for(var i=0;i<items.length;i++){
           if(thumbId==items[i].id && items[i].clickthroughUrl){
             this.setAttribute("data-clickthrough-url",items[i].clickthroughUrl).on("click",function(e){
               e.preventDefault();
               e.stopPropagation();
               window.location = this.getAttribute("data-clickthrough-url");
             })
           }
         }
       })
     }
   });
 </script>

Link to comment
Quote

I'm running this code injection which I found on a forum posting in the gallery block gear.

One thing I noticed is that the code is installed twice. Don't know if that is causing an issue but I suggest removing the duplicated code.

I did this locally and all the images I click on seemed to work. Can you provide some screenshots of images that are not working for you?

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 3 weeks later...
2 hours ago, KingAlex said:

I am having the same issue

Could you be more specific where the clickthrough is not working? The SS support article mentioned above says York is supported with the exception of Project pages. Please see Gallery page clickthrough URLs by template.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.