The Yii2 extension uses jQuery LightBox and OwlCarousel js and makes image galary from php array of structure defined., (*1)
Image galary PHP Array generator., (*2)
, (*3)
Installation
The preferred way to install this extension is through composer., (*4)
Either run:, (*5)
composer require slavkovrn/yii2-imagegalary
or add, (*6)
"slavkovrn/yii2-imagegalary": "*"
to the require section of your composer.json
file., (*7)
Usage
Set link to extension in your view:, (*8)
= ImageGalaryWidget::widget([
'id' =>'imagegalary', // id of plugin should be unique at page
'class' =>'imagegalary', // class of div to define style
'css' => 'border:white;', // css commands of class (for example - border-radius:5px;)
'image_width' => 320, // height of image visible in pixels
'image_height' => 240, // width of image visible in pixels
'thumb_width' => 80, // height of thumb images in pixels
'thumb_height' => 50, // width of thumb images in pixels
'items' => 3, // number of thumb items
'images' => [ // images of galary
[
'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image1.jpg',
'title' => 'Image visible in widget',
],
[
'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image2.jpg',
'title' => 'image 1',
],
[
'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image3.jpg',
'title' => 'image 2',
],
[
'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image4.jpg',
'title' => 'image 3',
],
]
]) ?>
write comments to admin, (*9)