Fork from https://github.com/kowap/yii2-lightgallery fix paths to lib
More information about gallery here.
The preferred way to install this extension is through composer.
Either run
composer require ofilin/yii2-lightgallery
or add
"ofilin/yii2-lightgallery": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply use it in your code by :
<?php
echo \ofilin\lightgallery\LightGalleryWidget::widget([
'items' => [
[
'thumb' => '../thumb/image_1.jpg',
'src' => '../big/image_1.jpg'
],
[
'thumb' => '../thumb/image_2.jpg',
'src' => '../big/image_2.jpg'
]
],
// more options http://sachinchoolur.github.io/lightGallery/docs/api.html
'options' => [
'mode' => 'lg-zoom-in-big',
'download' => false,
'zoom' => false,
'share' => false
]
]);
?>