Jump to content

dp12

Member
  • Posts

    0
  • Joined

  • Last visited

Reputation Activity

  1. Like
    dp12 reacted to brandon in Gallery Caption workarounds for 7.1?   
    Hi @emmaj.
    A1: There are a couple ways to do this. The JavaScript is setup so that you can pass in your own CSS selector. That allows you to set which galleries get descriptions (by default, all of them do). In your case, it sounds like you only want to select gallery lightboxes. So replace this line in the JavaScript:
    addGalleryItemDescriptions(); with
    addGalleryItemDescriptions(".gallery-lightbox"); An alternative way (instead of the above) would be to simply leave the JavaScript alone (so all galleries would still have descriptions) but then hide it on certain galleries using CSS. You'd use your browser's inspector/developer tools to find the correct selectors and write the CSS. Something like this might work:
    section.gallery-section .gallery-item-description { display: none !important; }  
    A2:
    .gallery-item-description { text-align: left; }  
    A3:
    This would technically be possible by using the image file name as the title. You'd be sure you name your file "This is my title.jpg", then the JavaScript component of the code I wrote could be amended to add that as the title (minus the file extension ".jpg".). That'd take a fair bit of additional custom development time, but it is possible.
     
×
×
  • 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.