Wallogit.com
2017 © Pedro Peláez
Yii2 widget to create lightboxed images
Yii2 framework widget for lightboxed images.
It extension is wrapper for javascript lightbox coded by Lokesh Dakar, (*1)
, (*2)
The preferred way to install is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist d1soft/yii2-lightboxedimage "*"
or add, (*5)
"d1soft/yii2-lightboxedimage": "*"
to the require section of your composer.json file., (*6)
<?= LiteboxedImage::widget([
'options' => [
'src' => '/path/to/image.jpg',
'lightboxId' => 'lightBox',
'lightboxClass' => 'lightBoxClass',
'lightboxStyle' => 'max-height: 350px',
'imageId' => 'imageId',
'imageClass' => 'imageClass',
'imageStyle' => 'max-width: 250px',
'title' => 'Image title',
'alt' => 'Some image',
],
'clientOptions' => [
'resizeDuration' => 200,
'wrapAround' => true
]
]); ?>
Image source path, (*7)
default: ''
Alternate image specified text, (*8)
default: ''
Title image in lightbox, (*9)
Lightbox id, (*10)
default: ''
Lightbox class, (*11)
default: ''
Lightbox inline styles, (*12)
default: ''
Image container id, (*13)
default: ''
Image container class, (*14)
default: ''
Image container inline style, (*15)
Client options you can see here, (*16)