slavkovrn / yii2-imagegalary
The Yii2 extension uses jQuery PrettyPhoto and OwlCarousel js and makes image galary from php array of structure defined.
Installs: 1 930
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 1
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-10-12 03:58:15 UTC
README
The Yii2 extension uses jQuery LightBox and OwlCarousel js and makes image galary from php array of structure defined.
Image galary PHP Array generator.
Installation
The preferred way to install this extension is through composer.
Either run:
composer require slavkovrn/yii2-imagegalary
or add
"slavkovrn/yii2-imagegalary": "*"
to the require section of your composer.json
file.
Usage
Set link to extension in your view:
<?php use slavkovrn\imagegalary\ImageGalaryWidget; ?> <?= 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', ], ] ]) ?>