We're using the New Modern Style template. We have one feature we would like to add: click any of the images to see a full size version in a lightbox.
I haven't found a lightbox feature built in to Layerslider.
If there isn't one, I have a work around. My theme already uses baguetteBox.js to show regular Gutenberg images in a lightbox. I just have to get the image layer to link to itself (e.g. "/wp-content/uploads/xyz/image.jpg").
Does Layerslider have a shortcode or placeholder I can put in the Image → Layer Settings → Link to link to itself automatically (e.g. `{{this.image_url}}` or something)?
Also, if there are other placeholders could you link to where they are documented?
You can use LayerSlider's Popup feature for that. I recommend you to:
- Create a new LayerSlider Project, - Set the layout to Popup under Project settings, - Set the popup size and layout settings - Add your images to the popup as Slide Backgrounds (every slide should contain only one slide image)
After that, in your main slider, please select the thumbnail you would like to open the "lightbox" (which will be the Popup). On the right Sidebar, navigate to Layers → Actions, and add a new layer action: Open Popup. Select your Popup from the list and enter the required slide number with the Open with slide field.
We're using the New Modern Style template. We have one feature we would like to add: click any of the images to see a full size version in a lightbox.
I haven't found a lightbox feature built in to Layerslider.
If there isn't one, I have a work around. My theme already uses baguetteBox.js to show regular Gutenberg images in a lightbox. I just have to get the image layer to link to itself (e.g. "/wp-content/uploads/xyz/image.jpg").
Does Layerslider have a shortcode or placeholder I can put in the Image → Layer Settings → Link to link to itself automatically (e.g. `{{this.image_url}}` or something)?
Also, if there are other placeholders could you link to where they are documented?
Hello Octane,
First of all, I am sorry for the delayed reply.
You can use LayerSlider's Popup feature for that. I recommend you to:
- Create a new LayerSlider Project,
- Set the layout to Popup under Project settings,
- Set the popup size and layout settings
- Add your images to the popup as Slide Backgrounds (every slide should contain only one slide image)
After that, in your main slider, please select the thumbnail you would like to open the "lightbox" (which will be the Popup). On the right Sidebar, navigate to Layers → Actions, and add a new layer action: Open Popup. Select your Popup from the list and enter the required slide number with the Open with slide field.
Best Regards,
George | Kreatura Dev Team