Sherkin Posted October 21, 2022 Share Posted October 21, 2022 I am trying to get a gallery block in 7.1 to display the file name as the Title. I have "show title" ticked in Design panel. I have tried some scripts from the forum, but they dont seem to work with 7.1 As I have hundreds of images to upload, i dont want to manually type the "Titles" in when the title is correct is the file name I upload. Any help, most appreciated. With thanks Adrian Link to comment
tuanphan Posted October 23, 2022 Share Posted October 23, 2022 You can try this code, if you haven't entered caption, the code will get file name as caption Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Ian_A Posted November 20 Share Posted November 20 Old topic, but incase anyone is still in need of a solution, here is how I do it with jQuery. I apply the code per page as I only use it on specific gallery pages made for client previews. <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> <script> // Function to replace image-slide-title content with alt tag for images within sqs-gallery-container using jQuery $(document).ready(function() { $('.sqs-gallery-container img').each(function(index) { $('.image-slide-title').eq(index).html($(this).attr('alt').replace('.jpg', '')); }); }); </script> tuanphan 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment