Jump to content

How can I put a hyperlink in my lightbox caption with Squarespace 7.1?

Recommended Posts

Site URL: https://raymortenson.squarespace.com

Hey all,

I am woking on styling the captions of a site – https://raymortenson.squarespace.com (in production so pw: Portfolio)

this project page for example: https://raymortenson.squarespace.com/projects/natural-landscape

I'll break out separate posts for additional questions. I want to add links to the captions. I've tried a few things but nothing works so far.

 

thanks

Link to comment

Thanks for the suggestion.

currently, (lets use this image with caption as an example:

https://raymortenson.squarespace.com/meadowland-journal-lightbox?itemId=yqusrd4unfpmgo14uuxwlo5rw5wog6

 

has a link in the descriptions of: untitled, Meadowland Journal, image no. 4-30-09 1 1-11, <a href="https://google.com">view the video here.</a>

 

but the link doesn't work. I suspect it might be related to the caption text not being selectable?

 

Link to comment
  • 2 weeks later...
On 5/1/2021 at 4:24 AM, harlan erskine said:

Hello, 

 

I'm returning to this issue and working to get this image's caption to have a link:

https://raymortenson.squarespace.com/meadowland-journal-lightbox?itemId=yqusrd4unfpmgo14uuxwlo5rw5wog6

the image caption is currently:


untitled, Meadowland Journal, image no. 4-30-09 1 1-11, <a href="https://google.com">view the video here.</a>

thanks

It seems can't add link. 

you can post on some FB groups
+ Squarespace Customization Resource Groups
+ Squarespace Community

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...
  • 6 months later...
On 10/30/2023 at 10:32 PM, Frick74 said:

I'm also interested in a solution on this matter, I checked the website > I think the issue isn't solved. If someone knows a solution, that would be great!

 

 

On 10/30/2023 at 10:32 PM, Frick74 said:

I'm also interested in a solution on this matter, I checked the website > I think the issue isn't solved. If someone knows a solution, that would be great!

 

Caption in Gallery Lightbox, Image Block Lightbox or?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
3 hours ago, tuanphan said:

 

Caption in Gallery Lightbox, Image Block Lightbox or?

hi, in the gallery Lightbox > If you check this comment you can see the problem. ( click on the top title next to the F 'Lightbox captions only' Tuesday...  )

 

 

Thanks

Edited by Frick74

Dutch Photographer trying to build his own fantastic website!

Link to comment

I tried this solution with your code, but the problem is on mobile. The user can't scroll to other images in the gallery, the link is automatically clicked.

<!-- code voor link in image caption bij gallery masonry caption --------------------->

<script>
  document.addEventListener(
  "click",
  function (e) {
    if ([...e.target.classList].includes("gallery-lightbox-control")) {
      e.preventDefault();
      e.stopImmediatePropagation();
      if (jQuery("figure[data-active='true']").find("a").length) {
      }
      window.open(jQuery("figure[data-active='true']").find("a").attr("href"), "_parent");
    }
  },
  true
);
</script>

<!-- end --------------------->

 

Edited by Frick74

Dutch Photographer trying to build his own fantastic website!

Link to comment
On 5/8/2021 at 6:15 AM, harlan erskine said:

Thanks @tuanphan I'm on the hunt for a solution - annoying that it's so hard.

@harlan erskine @CooperWhite The HTML in caption has been sanitized. Have you tried to add the caption into your image as metadata?

https://support.squarespace.com/hc/en-us/articles/205812798-Importing-image-metadata#:~:text=necessary formatting standards.-,Enable metadata importing,Check Enable Image Metadata Importing.

For example https://www.whitprint.com/catalog/emerald-print-exchange-2020

image.thumb.png.63b5cdb1ac7a824a3566b2ed2cac236d.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 11/3/2023 at 2:54 PM, Frick74 said:

I tried this solution with your code, but the problem is on mobile. The user can't scroll to other images in the gallery, the link is automatically clicked.

<!-- code voor link in image caption bij gallery masonry caption --------------------->

<script>
  document.addEventListener(
  "click",
  function (e) {
    if ([...e.target.classList].includes("gallery-lightbox-control")) {
      e.preventDefault();
      e.stopImmediatePropagation();
      if (jQuery("figure[data-active='true']").find("a").length) {
      }
      window.open(jQuery("figure[data-active='true']").find("a").attr("href"), "_parent");
    }
  },
  true
);
</script>

<!-- end --------------------->

 

What is the case when you using this code? In your other post, they are the Gallery Sections, which you can paste the HTML in the caption?

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 11/7/2023 at 1:46 PM, Beyondspace said:

What is the case when you using this code? In your other post, they are the Gallery Sections, which you can paste the HTML in the caption?

 

Hi, I used the code solution which you can find in the ‘lightbox captions only’ thread. This solution works for me. 

Edited by Frick74

Dutch Photographer trying to build his own fantastic website!

Link to comment
On 11/7/2023 at 7:43 AM, Beyondspace said:

@harlan erskine @CooperWhite The HTML in caption has been sanitized. Have you tried to add the caption into your image as metadata?

You're kidding, right? Importing metadata from images into a Gallery section has been broken for a couple of years now. I've had to go into hundreds of images and paste captions (Descriptions) because importing doesn't work. I've had multiple conversations with Squarespace and they know it, but apparently don't want to fix it.

 

 

Link to comment

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.