How can I add more LightGallery plugins (lgZoom, lgAutoplay, lgComment, lgFullscreen , lgHash, lgPager, lgRotate, lgShare, lgThumbnail, lgVideo, lgMediumZoom? #176
-
I would like to show more options when I click on an image such as lgFullscreen or lgMediumZoom. To do so, I tried to figure out which options of the theme are available in this Theme:
In order to add new plugins (for example, full screen) I added the following lines:
in layouts/partials/assets.html:
I added lg-fullscreen.min.js in lib/lightgallery/ from https://github.com/sachinchoolur/lg-fullscreen/blob/master/dist/lg-fullscreen.min.js and I added this line in assets/data/cdn/jsdelivr.yml:
However when I click on the image, there is no buttom showing up for full screen. Might it bue due to a non-matching versions between scripts? Could anyone help me? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to update the The For example, you probably want to change it to
to enable the fullscreen plugin. Be aware that DoIt theme is still using lightgallery.js 1.x, so you need to pick up the corresponding plugins for them to work correctly. |
Beta Was this translation helpful? Give feedback.
You need to update the
$config
variable as well.The
$config
variable is a dictionary including all the options for lightgallery. lightgallery will be initialized by callinglightGallery(document.getElementById('content'), $config)
.For example, you probably want to change it to
to enable the fullscreen plugin.
Be aware that DoIt theme is still using lightgallery.js 1.x, so you need to pick up the corresponding plugins for them to work correctly.