Skip Navigation

[Resolved] lightbox effet in image gallery with repeated fields

This thread is resolved. Here is a description of the problem and solution.

Problem:

Create a lightbox effect in an image gallery we created in a view

We created the following code but each image shall be linked to the same image in a full resolution

[types class="grid-item" field='galleria-immagini' alt='%%ALT%%' title='%%TITLE%%' width='400' align='none' resize='proportional'][/types]

Solution:

It is depends on what lightbox script you are using, for example, see the solution of anther similar thread:

https://toolset.com/forums/topic/featured-image-lightbox/#post-274019

In your case, your can output image URL by setting Types shortcode attribute url="true", see our document:

https://toolset.com/documentation/customizing-sites-using-php/functions/#image

url:
'false'(default) | 'true'
true=output the url of the image instead of the html img tag.

Works with the size attribute to output the url of the re-sized image

Relevant Documentation:

https://toolset.com/documentation/customizing-sites-using-php/functions/#image

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Franco Calcagni 6 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#627313

Tell us what you are trying to do? create a lightbox effect in an image gallery we created in a view

We created the following code but each image shall be linked to the same image in a full resolution
[types class="grid-item" field='galleria-immagini' alt='%%ALT%%' title='%%TITLE%%' width='400' align='none' resize='proportional'][/types]

The page with the gallery is this: hidden link

Then we have to create a masonry layout so to have the images in 2 columns with the option to have them in a 1-column list, but the first thimg we need is to get done the lightbox effect.

Franco

#627608

Dear Franco,

It is depends on what lightbox script you are using, for example, see the solution of anther similar thread:
https://toolset.com/forums/topic/featured-image-lightbox/#post-274019

In your case, your can output image URL by setting Types shortcode attribute url="true", see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image

url:
'false'(default) | 'true'
true=output the url of the image instead of the html img tag.

Works with the size attribute to output the url of the re-sized image

#628210

problem solved thanks