Jump to content

LKW

Member
  • Posts

    70
  • Joined

  • Last visited

Community Answers

  1. LKW's post in Workaround for image title taken from filename instead of Object Name metadata? was marked as the answer   
    Here is the workaround I came up with. I used our image metadata spreadsheet to generate a script that renames my image files.  I gave them names like _IMG123456_Sunset Clouds_.jpg and uploaded them to a gallery page. The ugly image filenames appear as titles on that page, but luckily we have only one page that needs to show image titles and that's a page with a gallery block. So I injected this code on the page where the gallery block will appear:
    <script> jQuery(document).ready(function($) { $( "div.image-slide-title" ).each( function(){ var fnstr = $( this ).text(); $( this ).text( fnstr.split( "_" )[2] ); }); }); </script> The gallery block now shows thumbnails with nice image titles extracted from the filenames. The lightbox still displays the ugly filename, but we were already suppressing the lightbox's image titles anyway because we only need the image description to appear in that context:
    <style> .sqs-lightbox-meta h1 { font-size: 0em !important; } </style> This ungainly workaround seems to solve our problem, for this tiny case at least, on our 7.0 Montauk site.
×
×
  • 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.