Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Dane
Experienced
Topic Author
Posts: 121
Joined: 04 Dec 2020, 15:05

Image popup in content

16 Dec 2020, 14:11

Hi!

Is it possible to make images clickable to enlarge, if you have added them to the content via this code?
<img src="{{path}}IMG_0019.jpg" alt="" />
For blog articles, I hide the gallery, and then just paste the images into the text in the from this menu:
2020-12-16 20_10_20-Window.png
2020-12-16 20_10_20-Window.png (229.38 KiB) Viewed 1404 times
But these images can no longer be enlarged when you click on them. 

Thanks!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Image popup in content

17 Dec 2020, 02:05

Dane wrote:But these images can no longer be enlarged when you click on them. 
In your screenshot, see the "popup link" checkbox? That wraps the image in a link that allows the image to be opened in the X3 popup on click.

Basically your code will look something like this:
Code
<a href="{{path}}name.jpg" data-popup><img src="{{path}}name.jpg" alt="" /></a>
In the above, the data-popup attribute triggers the javascript that handles the popup. You can read more about using the X3 popup in your custom content here:
https://demo.photo.gallery/examples/plugins/popup/