Elevating Dynamic Galleries with Lightboxify URLs
By default, when clicking on a lightbox-enabled image, it typically opens as a single image in a continuous slideshow lightbox. However, Lightbox Studio introduces a notable feature: the capability to convert a single image into a dynamic lightbox gallery, each independent from the others. This is made possible by leveraging Lightboxify URLs.
Terminology
To provide clarity throughout the post, here are some key terms:
Source Gallery: This refers to the gallery content that will be displayed when an image is clicked.
Featured Image: This can be either an individual image or a slide within a gallery. When clicked, it triggers the opening of the source gallery in the lightbox.
Lightboxify URLs: These are URLs that, when used, convert image links into lightbox galleries
What are Lightboxify URLs?
Lightboxify URLs are normal URLs with a special parameter that transforms the lightbox behavior. They enable the creation of separate galleries within a lightbox, allowing users to view multiple images from a single click.
Format of Lightboxify URLs
To create a lightboxify Gallery, follow these steps:
1. Create a new page and insert a Gallery block or Gallery section to create a Source gallery
2. Insert a Gallery block or Gallery section and grab one of the following Gallery IDs (you can use the Squarespace ID Finder)
Section ID: Found in the format
section[data-section-id="661df2d06d4b51239f4e87b7"]
, use the part after the equals sign (e.g.,661df2d06d4b51239f4e87b7
).Block ID: Found in the format
#block-yui_3_17_2_2_1716172038600_2128
, use the part after the#
(e.g.,block-yui_3_17_2_2_1716172038600_2128
).Section anchor ID: you can also use the anchor id of Squarespace section, by edit section -> scroll to Anchor Link and assign your unique anchor ID for the section
3. The URL format will be: /gallery?lightboxify=true#gallery_id
.
Insert the URL into the Image clickthrough URL of your gallery images.
Note to readers: If the Gallery ID isn’t available in the URL, Lightbox Studio will automatically use the first gallery block or section of the page. You can insert multple galleries in the sample page with different gallery ID
Where Lightboxify URLs Support
All clickthrough URLs can be modified to become Lightboxify URLs. You can insert clickthrough URLs into:
Gallery pages
Text links
Portfolio page Grid layouts (URLs to portfolio projects)
With the new update, Portfolio page Grid layouts now support opening portfolio projects in a lightbox, allowing users to view project galleries without leaving the main portfolio page.
It is recommended to enable Lightbox indicators in Lightbox Studio so users know that clicking on the current image will open a separate gallery.
Creating a Source Gallery
A Source gallery is used to store the gallery content, including images, video assets, and captions. Here’s how to set it up:
Choose a Gallery: You can use any Gallery block or Gallery section layouts to create a source gallery. However, it is recommended to use a Grid gallery block with lightbox enabled to ensure complete extraction of its content.
Compatibility: Gallery blocks are chosen for this tutorial to ensure compatibility with both Squarespace 7.0 and 7.1 templates.
What Includes in the Lightbox?
By default, the featured image will be included in the lightbox. Therefore, it is best to use the same image for both the featured image and the first image of the Source gallery. This ensures consistency and provides a seamless user experience when transitioning from the featured image to the full Source gallery.
Step-by-Step Guide
1. Create the Source Gallery:
Create a new page.
Name it properly, for example: /source-gallery
Insert Gallery blocks (or Gallery sections)
2. Create the Lightboxify URL
Use Chrome extension to grab the ID of the Gallery blocks
The Lightboxify will look like this: /source-gallery?lightboxify=true#block-yui_3_17_2_1_1716134815539_3510
Source gallery page: /source-gallery
Lightboxify url parameter: ?lightboxify=true
Target block ID: #block-yui_3_17_2_1_1716134815539_3510
Note to readers: You can either use Gallery block or Gallery section as Source gallery. If the Gallery ID isn’t available in the URL, Lightbox Studio will automatically use the first gallery block or section of the page.
3. Insert the Lightboxify URL to gallery
In this specific tutorial we will insert the URL to a Gallery block, other gallery layout will have different ways to append URLs to images
Keep editing the clickthrough URLs for all Gallery slides until finish. Each source gallery will have unique ID so each slide will open a seperate lightbox gallery.
Below is the demostration video where each slide in a Grid gallery block is opening a seperate gallery when click, including the image itself
Another example, where different image blocks in various aspect ratio making a custom grid using Fluid engine are opening seperate lightbox galleries upon click
If you're unable to insert a Gallery block on your Squarespace 7.1 website, you can use the Classic Gallert block plugin to overcome this limitation. Here’s how to do it:
Install the Classic Gallery Block Plugin:
Activate Classic Gallery block using Ground Control
Insert the Gallery Block:
Once enabled, you’ll see the Gallery Block option when inserting a new block into your sections.
You can now add and customize gallery blocks on any page section in Squarespace 7.1.
For more detailed guidance, you can check out the full article on how to insert Gallery blocks here.